git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
usb
/
storage
/
datafab.c
diff --git
a/drivers/usb/storage/datafab.c
b/drivers/usb/storage/datafab.c
index
58baacc
..
94798eb
100644
(file)
--- a/
drivers/usb/storage/datafab.c
+++ b/
drivers/usb/storage/datafab.c
@@
-50,16
+50,19
@@
* in that routine.
*/
* in that routine.
*/
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+
#include "transport.h"
#include "protocol.h"
#include "usb.h"
#include "debug.h"
#include "datafab.h"
#include "transport.h"
#include "protocol.h"
#include "usb.h"
#include "debug.h"
#include "datafab.h"
-#include <linux/sched.h>
-#include <linux/errno.h>
-#include <linux/slab.h>
-
static int datafab_determine_lun(struct us_data *us,
struct datafab_info *info);
static int datafab_determine_lun(struct us_data *us,
struct datafab_info *info);
@@
-388,7
+391,7
@@
static int datafab_id_device(struct us_data *us,
static int datafab_handle_mode_sense(struct us_data *us,
static int datafab_handle_mode_sense(struct us_data *us,
-
Scsi_C
mnd * srb,
+
struct scsi_c
mnd * srb,
int sense_6)
{
static unsigned char rw_err_page[12] = {
int sense_6)
{
static unsigned char rw_err_page[12] = {
@@
-483,7
+486,7
@@
static int datafab_handle_mode_sense(struct us_data *us,
if (sense_6)
ptr[0] = i - 1;
else
if (sense_6)
ptr[0] = i - 1;
else
- ((
u
16 *) ptr)[0] = cpu_to_be16(i - 2);
+ ((
__be
16 *) ptr)[0] = cpu_to_be16(i - 2);
usb_stor_set_xfer_buf(ptr, i, srb);
return USB_STOR_TRANSPORT_GOOD;
usb_stor_set_xfer_buf(ptr, i, srb);
return USB_STOR_TRANSPORT_GOOD;
@@
-498,7
+501,7
@@
static void datafab_info_destructor(void *extra)
// Transport for the Datafab MDCFE-B
//
// Transport for the Datafab MDCFE-B
//
-int datafab_transport(
Scsi_C
mnd * srb, struct us_data *us)
+int datafab_transport(
struct scsi_c
mnd * srb, struct us_data *us)
{
struct datafab_info *info;
int rc;
{
struct datafab_info *info;
int rc;
@@
-540,8
+543,8
@@
int datafab_transport(Scsi_Cmnd * srb, struct us_data *us)
// build the reply
// we need the last sector, not the number of sectors
// build the reply
// we need the last sector, not the number of sectors
- ((
u
32 *) ptr)[0] = cpu_to_be32(info->sectors - 1);
- ((
u
32 *) ptr)[1] = cpu_to_be32(info->ssize);
+ ((
__be
32 *) ptr)[0] = cpu_to_be32(info->sectors - 1);
+ ((
__be
32 *) ptr)[1] = cpu_to_be32(info->ssize);
usb_stor_set_xfer_buf(ptr, 8, srb);
return USB_STOR_TRANSPORT_GOOD;
usb_stor_set_xfer_buf(ptr, 8, srb);
return USB_STOR_TRANSPORT_GOOD;
@@
-625,12
+628,12
@@
int datafab_transport(Scsi_Cmnd * srb, struct us_data *us)
if (srb->cmnd[0] == MODE_SENSE) {
US_DEBUGP("datafab_transport: MODE_SENSE_6 detected\n");
if (srb->cmnd[0] == MODE_SENSE) {
US_DEBUGP("datafab_transport: MODE_SENSE_6 detected\n");
- return datafab_handle_mode_sense(us, srb,
TRUE
);
+ return datafab_handle_mode_sense(us, srb,
1
);
}
if (srb->cmnd[0] == MODE_SENSE_10) {
US_DEBUGP("datafab_transport: MODE_SENSE_10 detected\n");
}
if (srb->cmnd[0] == MODE_SENSE_10) {
US_DEBUGP("datafab_transport: MODE_SENSE_10 detected\n");
- return datafab_handle_mode_sense(us, srb,
FALSE
);
+ return datafab_handle_mode_sense(us, srb,
0
);
}
if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {
}
if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {