aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-headers/scsi.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-01-06 10:46:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-01-06 10:46:29 +0000
commit1596e9266586fb64e63dbcf3a9bcacbe3b49391c (patch)
tree2a42ebe6c063af44ca38cfc6e52be9bd3fd4fdff /main/linux-headers/scsi.patch
parent3c9381442cb2cf40402d98e863cfe19ccb83d1a0 (diff)
downloadaports-1596e9266586fb64e63dbcf3a9bcacbe3b49391c.tar.bz2
aports-1596e9266586fb64e63dbcf3a9bcacbe3b49391c.tar.xz
main/linux-headers: fix issues with transition of scsi.h
Diffstat (limited to 'main/linux-headers/scsi.patch')
-rw-r--r--main/linux-headers/scsi.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/main/linux-headers/scsi.patch b/main/linux-headers/scsi.patch
new file mode 100644
index 0000000000..f85a3b7501
--- /dev/null
+++ b/main/linux-headers/scsi.patch
@@ -0,0 +1,42 @@
+diff -Naur linux-2.6.32-old/include/scsi/scsi.h linux-2.6.32/include/scsi/scsi.h
+--- linux-2.6.32-old/include/scsi/scsi.h 2009-12-03 13:51:21.000000000 +1000
++++ linux-2.6.32/include/scsi/scsi.h 2009-12-12 10:43:11.000000000 +1000
+@@ -145,14 +145,15 @@
+
+ /* 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 */
+ };
+
++#ifdef __KERNEL__
+ static inline unsigned
+ scsi_varlen_cdb_length(const void *hdr)
+ {
+@@ -168,6 +169,7 @@
+ 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
+@@ -284,8 +286,10 @@
+ SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */
+ };
+
++#ifdef __KERNEL__
+ /* Returns a human-readable name for the device */
+ extern const char * scsi_device_type(unsigned type);
++#endif
+
+ /*
+ * standard mode-select header prepended to all mode-select commands