On Thursday 03 December 2009, Greg KH wrote: > On Thu, Dec 03, 2009 at 12:31:39AM +0100, Torsten Duwe wrote: > > Hi Greg! > > > > When I recompiled my system yesterday with includes from the latest > > stable kernel(s) I found especially CD IO and similar breaking due to > > <scsi/scsi.h>. At least 2.6.32-rc8 and 2.6.31.6 need fixing. Please apply > > attached patch or equivalent. > > Is the patch upstream already? > > If not, please send this to the scsi maintainer, it needs to be there > before I can apply it to the -stable releases. Given that 2.6.32-rc8 and 2.6.31.6 are affected I don't think so. Resending. linux-scsi, feel free to ignore this if it's already fixed. Otherwise: Signed-off-by: Torsten Duwe <duwe@xxxxxx>
--- linux-2.6.31/include/scsi/scsi.h.orig 2009-09-10 00:13:59.000000000 +0200 +++ linux-2.6.31/include/scsi/scsi.h 2009-12-02 01:00:34.000000000 +0100 @@ -142,10 +142,10 @@ struct scsi_cmnd; /* 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 */ + __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 */ }; @@ -156,6 +156,7 @@ scsi_varlen_cdb_length(const void *hdr) return ((struct scsi_varlen_cdb_hdr *)hdr)->additional_cdb_length + 8; } +#ifdef __KERNEL__ extern const unsigned char scsi_command_size_tbl[8]; #define COMMAND_SIZE(opcode) scsi_command_size_tbl[((opcode) >> 5) & 7] @@ -165,6 +166,7 @@ scsi_command_size(const unsigned char *c return (cmnd[0] == VARIABLE_LENGTH_CMD) ? scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); } +#endif /* * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
Attachment:
signature.asc
Description: This is a digitally signed message part.