OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [char/] [ftape/] [lowlevel/] [ftape-bsm.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _FTAPE_BSM_H
2
#define _FTAPE_BSM_H
3
 
4
/*
5
 * Copyright (C) 1994-1996 Bas Laarhoven,
6
 *           (C) 1996-1997 Claus-Justus Heine.
7
 
8
 This program is free software; you can redistribute it and/or modify
9
 it under the terms of the GNU General Public License as published by
10
 the Free Software Foundation; either version 2, or (at your option)
11
 any later version.
12
 
13
 This program is distributed in the hope that it will be useful,
14
 but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 GNU General Public License for more details.
17
 
18
 You should have received a copy of the GNU General Public License
19
 along with this program; see the file COPYING.  If not, write to
20
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21
 
22
 *
23
 * $Source: /home/marcus/revision_ctrl_test/oc_cvs/cvs/or1k/linux/linux-2.4/drivers/char/ftape/lowlevel/ftape-bsm.h,v $
24
 * $Revision: 1.1.1.1 $
25
 * $Date: 2004-04-15 02:02:36 $
26
 *
27
 *      This file contains definitions for the bad sector map handling
28
 *      routines for the QIC-117 floppy-tape driver for Linux.
29
 */
30
 
31
#include <linux/ftape.h>
32
#include <linux/ftape-header-segment.h>
33
 
34
#define EMPTY_SEGMENT           (0xffffffff)
35
#define FAKE_SEGMENT            (0xfffffffe)
36
 
37
/*  maximum (format code 4) bad sector map size (bytes).
38
 */
39
#define BAD_SECTOR_MAP_SIZE     (29 * SECTOR_SIZE - 256)
40
 
41
/*  format code 4 bad sector entry, ftape uses this
42
 *  internally for all format codes
43
 */
44
typedef __u32 SectorMap;
45
/*  variable and 1100 ft bad sector map entry. These three bytes represent
46
 *  a single sector address measured from BOT.
47
 */
48
typedef struct NewSectorMap {
49
        __u8 bytes[3];
50
} SectorCount __attribute__((packed));
51
 
52
 
53
/*
54
 *      ftape-bsm.c defined global vars.
55
 */
56
 
57
/*
58
 *      ftape-bsm.c defined global functions.
59
 */
60
extern void update_bad_sector_map(__u8 * buffer);
61
extern void ftape_extract_bad_sector_map(__u8 * buffer);
62
extern SectorMap ftape_get_bad_sector_entry(int segment_id);
63
extern void      ftape_put_bad_sector_entry(int segment_id, SectorMap mask);
64
extern __u8 *ftape_find_end_of_bsm_list(__u8 * address);
65
extern void ftape_init_bsm(void);
66
 
67
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.