diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/ps3.h | 3 | ||||
-rw-r--r-- | include/asm-sparc/oplib.h | 17 | ||||
-rw-r--r-- | include/asm-sparc/page.h | 5 | ||||
-rw-r--r-- | include/linux/ieee80211.h | 2 | ||||
-rw-r--r-- | include/linux/if_bridge.h | 4 | ||||
-rw-r--r-- | include/linux/rio.h | 2 | ||||
-rw-r--r-- | include/linux/wireless.h | 7 | ||||
-rw-r--r-- | include/scsi/scsi.h | 40 | ||||
-rw-r--r-- | include/scsi/scsi_cmnd.h | 23 | ||||
-rw-r--r-- | include/scsi/scsi_eh.h | 4 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 8 |
11 files changed, 67 insertions, 48 deletions
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 9e8ed6824e15..81ffe3b3c1ce 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h @@ -178,9 +178,6 @@ enum ps3_cpu_binding { PS3_BINDING_CPU_1 = 1, }; -int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet, - unsigned int *virq); -int ps3_virq_destroy(unsigned int virq); int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet, unsigned int *virq); int ps3_irq_plug_destroy(unsigned int virq); diff --git a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h index 17ba82ee220a..7becc846544a 100644 --- a/include/asm-sparc/oplib.h +++ b/include/asm-sparc/oplib.h @@ -34,9 +34,6 @@ extern unsigned int prom_rev, prom_prev; */ extern int prom_root_node; -/* PROM stdin and stdout */ -extern int prom_stdin, prom_stdout; - /* Pointer to prom structure containing the device tree traversal * and usage utility functions. Only prom-lib should use these, * users use the interface defined by the library only! @@ -84,20 +81,6 @@ extern int prom_devclose(int device_handle); extern void prom_seek(int device_handle, unsigned int seek_hival, unsigned int seek_lowval); -/* Machine memory configuration routine. */ - -/* This function returns a V0 format memory descriptor table, it has three - * entries. One for the total amount of physical ram on the machine, one - * for the amount of physical ram available, and one describing the virtual - * areas which are allocated by the prom. So, in a sense the physical - * available is a calculation of the total physical minus the physical mapped - * by the prom with virtual mappings. - * - * These lists are returned pre-sorted, this should make your life easier - * since the prom itself is way too lazy to do such nice things. - */ -extern struct linux_mem_v0 *prom_meminfo(void); - /* Miscellaneous routines, don't really fit in any category per se. */ /* Reboot the machine with the command line passed. */ diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index 39ccf2da297c..1625a8c3e0d2 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h @@ -38,12 +38,11 @@ /* The following structure is used to hold the physical * memory configuration of the machine. This is filled in - * probe_memory() and is later used by mem_init() to set up - * mem_map[]. We statically allocate SPARC_PHYS_BANKS of + * prom_meminit() and is later used by mem_init() to set up + * mem_map[]. We statically allocate SPARC_PHYS_BANKS+1 of * these structs, this is arbitrary. The entry after the * last valid one has num_bytes==0. */ - struct sparc_phys_banks { unsigned long base_addr; unsigned long num_bytes; diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 529f301d9372..0b5e03eae6d2 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -113,7 +113,7 @@ struct ieee80211_hdr { struct ieee80211s_hdr { u8 flags; u8 ttl; - u8 seqnum[3]; + __le32 seqnum; u8 eaddr1[6]; u8 eaddr2[6]; u8 eaddr3[6]; diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 58e43e566457..950e13d09e06 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h @@ -97,7 +97,9 @@ struct __fdb_entry __u8 port_no; __u8 is_local; __u32 ageing_timer_value; - __u32 unused; + __u8 port_hi; + __u8 pad0; + __u16 unused; }; #ifdef __KERNEL__ diff --git a/include/linux/rio.h b/include/linux/rio.h index c1c99c9643d3..dc0c75556c63 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h @@ -161,6 +161,8 @@ enum rio_phy_type { * @ops: configuration space functions * @id: Port ID, unique among all ports * @index: Port index, unique among all port interfaces of the same type + * @sys_size: RapidIO common transport system size + * @phy_type: RapidIO phy type * @name: Port name string * @priv: Master port private data */ diff --git a/include/linux/wireless.h b/include/linux/wireless.h index 2864b1699ecc..0a9b5b41ed67 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h @@ -69,14 +69,9 @@ /***************************** INCLUDES *****************************/ -/* This header is used in user-space, therefore need to be sanitised - * for that purpose. Those includes are usually not compatible with glibc. - * To know which includes to use in user-space, check iwlib.h. */ -#ifdef __KERNEL__ -#include <linux/types.h> /* for "caddr_t" et al */ +#include <linux/types.h> /* for __u* and __s* typedefs */ #include <linux/socket.h> /* for "struct sockaddr" et al */ #include <linux/if.h> /* for IFNAMSIZ and co... */ -#endif /* __KERNEL__ */ /***************************** VERSION *****************************/ /* diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 1f74bcd603fe..32742c4563de 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -30,13 +30,6 @@ #endif /* - * SCSI command lengths - */ - -extern const unsigned char scsi_command_size[8]; -#define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7] - -/* * Special value for scanning to specify scanning or rescanning of all * possible channels, (target) ids, or luns on a given shost. */ @@ -109,6 +102,7 @@ extern const unsigned char scsi_command_size[8]; #define MODE_SENSE_10 0x5a #define PERSISTENT_RESERVE_IN 0x5e #define PERSISTENT_RESERVE_OUT 0x5f +#define VARIABLE_LENGTH_CMD 0x7f #define REPORT_LUNS 0xa0 #define MAINTENANCE_IN 0xa3 #define MOVE_MEDIUM 0xa5 @@ -136,6 +130,38 @@ extern const unsigned char scsi_command_size[8]; #define ATA_12 0xa1 /* 12-byte pass-thru */ /* + * SCSI command lengths + */ + +#define SCSI_MAX_VARLEN_CDB_SIZE 260 + +/* defined in T10 SCSI Primary Commands-2 (SPC2) */ +struct scsi_varlen_cdb_hdr { + u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ + u8 control; + u8 misc[5]; + u8 additional_cdb_length; /* total cdb length - 8 */ + __be16 service_action; + /* service specific data follows */ +}; + +static inline unsigned +scsi_varlen_cdb_length(const void *hdr) +{ + return ((struct scsi_varlen_cdb_hdr *)hdr)->additional_cdb_length + 8; +} + +extern const unsigned char scsi_command_size_tbl[8]; +#define COMMAND_SIZE(opcode) scsi_command_size_tbl[((opcode) >> 5) & 7] + +static inline unsigned +scsi_command_size(const unsigned char *cmnd) +{ + return (cmnd[0] == VARIABLE_LENGTH_CMD) ? + scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); +} + +/* * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft * T10/1561-D Revision 4 Draft dated 7th November 2002. */ diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 8d20e60a94b7..3e46dfae8194 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -7,10 +7,28 @@ #include <linux/types.h> #include <linux/timer.h> #include <linux/scatterlist.h> +#include <linux/blkdev.h> struct Scsi_Host; struct scsi_device; +/* + * MAX_COMMAND_SIZE is: + * The longest fixed-length SCSI CDB as per the SCSI standard. + * fixed-length means: commands that their size can be determined + * by their opcode and the CDB does not carry a length specifier, (unlike + * the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly + * true and the SCSI standard also defines extended commands and + * vendor specific commands that can be bigger than 16 bytes. The kernel + * will support these using the same infrastructure used for VARLEN CDB's. + * So in effect MAX_COMMAND_SIZE means the maximum size command scsi-ml + * supports without specifying a cmd_len by ULD's + */ +#define MAX_COMMAND_SIZE 16 +#if (MAX_COMMAND_SIZE > BLK_MAX_CDB) +# error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB +#endif + struct scsi_data_buffer { struct sg_table table; unsigned length; @@ -60,12 +78,11 @@ struct scsi_cmnd { int allowed; int timeout_per_command; - unsigned char cmd_len; + unsigned short cmd_len; enum dma_data_direction sc_data_direction; /* These elements define the operation we are about to perform */ -#define MAX_COMMAND_SIZE 16 - unsigned char cmnd[MAX_COMMAND_SIZE]; + unsigned char *cmnd; struct timer_list eh_timeout; /* Used to time out the command. */ diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index d3a133b4a072..2a9add21267d 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h @@ -75,11 +75,11 @@ struct scsi_eh_save { int result; enum dma_data_direction data_direction; unsigned char cmd_len; - unsigned char cmnd[MAX_COMMAND_SIZE]; + unsigned char *cmnd; struct scsi_data_buffer sdb; struct request *next_rq; - /* new command support */ + unsigned char eh_cmnd[BLK_MAX_CDB]; struct scatterlist sense_sgl; }; diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index d967d6dc7a28..1834fdfe82a7 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -573,13 +573,11 @@ struct Scsi_Host { /* * The maximum length of SCSI commands that this host can accept. * Probably 12 for most host adapters, but could be 16 for others. + * or 260 if the driver supports variable length cdbs. * For drivers that don't set this field, a value of 12 is - * assumed. I am leaving this as a number rather than a bit - * because you never know what subsequent SCSI standards might do - * (i.e. could there be a 20 byte or a 24-byte command a few years - * down the road?). + * assumed. */ - unsigned char max_cmd_len; + unsigned short max_cmd_len; int this_id; int can_queue; |