ChangeSet 1.855.9.10, 2002/11/05 11:16:58-08:00, [EMAIL PROTECTED]
[PATCH] USB storage: move init of residue to a central place
This patch moves the initialization of the SCSI residue field to be in
just a couple of places, instead of all over the map. It's code
consolidation.
diff -Nru a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c
--- a/drivers/usb/storage/datafab.c Tue Nov 5 16:10:25 2002
+++ b/drivers/usb/storage/datafab.c Tue Nov 5 16:10:25 2002
@@ -520,7 +520,6 @@
0x00, 0x80, 0x00, 0x01, 0x1F, 0x00, 0x00, 0x00
};
- srb->resid = 0;
if (!us->extra) {
us->extra = kmalloc(sizeof(struct datafab_info), GFP_NOIO);
if (!us->extra) {
diff -Nru a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
--- a/drivers/usb/storage/isd200.c Tue Nov 5 16:10:25 2002
+++ b/drivers/usb/storage/isd200.c Tue Nov 5 16:10:25 2002
@@ -817,6 +817,7 @@
int transferStatus;
/* send the command to the transport layer */
+ srb->resid = 0;
transferStatus = isd200_Bulk_transport(us, srb, ataCdb,
sizeof(ataCdb->generic));
switch (transferStatus) {
diff -Nru a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c
--- a/drivers/usb/storage/jumpshot.c Tue Nov 5 16:10:25 2002
+++ b/drivers/usb/storage/jumpshot.c Tue Nov 5 16:10:25 2002
@@ -464,7 +464,6 @@
0x00, 0x80, 0x00, 0x01, 0x1F, 0x00, 0x00, 0x00
};
- srb->resid = 0;
if (!us->extra) {
us->extra = kmalloc(sizeof(struct jumpshot_info), GFP_NOIO);
if (!us->extra) {
diff -Nru a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
--- a/drivers/usb/storage/sddr09.c Tue Nov 5 16:10:25 2002
+++ b/drivers/usb/storage/sddr09.c Tue Nov 5 16:10:25 2002
@@ -1372,7 +1372,6 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
- srb->resid = 0;
info = (struct sddr09_card_info *)us->extra;
if (!info) {
nand_init_ecc();
diff -Nru a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
--- a/drivers/usb/storage/sddr55.c Tue Nov 5 16:10:25 2002
+++ b/drivers/usb/storage/sddr55.c Tue Nov 5 16:10:25 2002
@@ -746,7 +746,6 @@
unsigned short pages;
struct sddr55_card_info *info;
- srb->resid = 0;
if (!us->extra) {
us->extra = kmalloc(
sizeof(struct sddr55_card_info), GFP_NOIO);
diff -Nru a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
--- a/drivers/usb/storage/shuttle_usbat.c Tue Nov 5 16:10:25 2002
+++ b/drivers/usb/storage/shuttle_usbat.c Tue Nov 5 16:10:25 2002
@@ -775,7 +775,6 @@
int i;
char string[64];
- srb->resid = 0;
len = srb->request_bufflen;
/* Send A0 (ATA PACKET COMMAND).
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c Tue Nov 5 16:10:25 2002
+++ b/drivers/usb/storage/transport.c Tue Nov 5 16:10:25 2002
@@ -784,6 +784,7 @@
int result;
/* send the command to the transport layer */
+ srb->resid = 0;
result = us->transport(srb, us);
/* if the command gets aborted by the higher layers, we need to
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel