diff options
| author | Konstantin Katuev <kkatuev@gmail.com> | 2010-10-28 21:18:18 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-10 19:33:57 -0500 |
| commit | 307ae1d3d05e0379211277cc652c462d36873984 (patch) | |
| tree | 11955fca2423d6843977d885c110c1504c97986c | |
| parent | c3444e50b211f0c7b680a115fe1485694493dc82 (diff) | |
Staging: keucr driver: fix uninitialized variable & proper memset length
There was commented out transfer_flags initialization.
And i think memset should fill entire structure, not only length of
pointer to it.
This makes the driver work properly now on my hardware.
Signed-off-by: Konstantin Katuev <kkatuev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| -rw-r--r-- | drivers/staging/keucr/init.c | 18 | ||||
| -rw-r--r-- | drivers/staging/keucr/ms.c | 14 | ||||
| -rw-r--r-- | drivers/staging/keucr/msscsi.c | 6 | ||||
| -rw-r--r-- | drivers/staging/keucr/sdscsi.c | 4 | ||||
| -rw-r--r-- | drivers/staging/keucr/smilsub.c | 18 | ||||
| -rw-r--r-- | drivers/staging/keucr/transport.c | 2 |
6 files changed, 31 insertions, 31 deletions
diff --git a/drivers/staging/keucr/init.c b/drivers/staging/keucr/init.c index 1934805844f2..978bf87ff13d 100644 --- a/drivers/staging/keucr/init.c +++ b/drivers/staging/keucr/init.c | |||
| @@ -22,7 +22,7 @@ int ENE_InitMedia(struct us_data *us) | |||
| 22 | int result; | 22 | int result; |
| 23 | BYTE MiscReg03 = 0; | 23 | BYTE MiscReg03 = 0; |
| 24 | 24 | ||
| 25 | printk("--- Initial Nedia ---\n"); | 25 | printk("--- Init Media ---\n"); |
| 26 | result = ENE_Read_BYTE(us, REG_CARD_STATUS, &MiscReg03); | 26 | result = ENE_Read_BYTE(us, REG_CARD_STATUS, &MiscReg03); |
| 27 | if (result != USB_STOR_XFER_GOOD) | 27 | if (result != USB_STOR_XFER_GOOD) |
| 28 | { | 28 | { |
| @@ -64,7 +64,7 @@ int ENE_Read_BYTE(struct us_data *us, WORD index, void *buf) | |||
| 64 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf; | 64 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf; |
| 65 | int result; | 65 | int result; |
| 66 | 66 | ||
| 67 | memset(bcb, 0, sizeof(bcb)); | 67 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 68 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 68 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 69 | bcb->DataTransferLength = 0x01; | 69 | bcb->DataTransferLength = 0x01; |
| 70 | bcb->Flags = 0x80; | 70 | bcb->Flags = 0x80; |
| @@ -92,7 +92,7 @@ int ENE_SDInit(struct us_data *us) | |||
| 92 | return USB_STOR_TRANSPORT_ERROR; | 92 | return USB_STOR_TRANSPORT_ERROR; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | memset(bcb, 0, sizeof(bcb)); | 95 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 96 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 96 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 97 | bcb->Flags = 0x80; | 97 | bcb->Flags = 0x80; |
| 98 | bcb->CDB[0] = 0xF2; | 98 | bcb->CDB[0] = 0xF2; |
| @@ -112,7 +112,7 @@ int ENE_SDInit(struct us_data *us) | |||
| 112 | return USB_STOR_TRANSPORT_ERROR; | 112 | return USB_STOR_TRANSPORT_ERROR; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | memset(bcb, 0, sizeof(bcb)); | 115 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 116 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 116 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 117 | bcb->DataTransferLength = 0x200; | 117 | bcb->DataTransferLength = 0x200; |
| 118 | bcb->Flags = 0x80; | 118 | bcb->Flags = 0x80; |
| @@ -161,7 +161,7 @@ int ENE_MSInit(struct us_data *us) | |||
| 161 | return USB_STOR_TRANSPORT_ERROR; | 161 | return USB_STOR_TRANSPORT_ERROR; |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | memset(bcb, 0, sizeof(bcb)); | 164 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 165 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 165 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 166 | bcb->DataTransferLength = 0x200; | 166 | bcb->DataTransferLength = 0x200; |
| 167 | bcb->Flags = 0x80; | 167 | bcb->Flags = 0x80; |
| @@ -219,7 +219,7 @@ int ENE_SMInit(struct us_data *us) | |||
| 219 | return USB_STOR_TRANSPORT_ERROR; | 219 | return USB_STOR_TRANSPORT_ERROR; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | memset(bcb, 0, sizeof(bcb)); | 222 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 223 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 223 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 224 | bcb->DataTransferLength = 0x200; | 224 | bcb->DataTransferLength = 0x200; |
| 225 | bcb->Flags = 0x80; | 225 | bcb->Flags = 0x80; |
| @@ -341,7 +341,7 @@ int ENE_LoadBinCode(struct us_data *us, BYTE flag) | |||
| 341 | break; | 341 | break; |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | memset(bcb, 0, sizeof(bcb)); | 344 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 345 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 345 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 346 | bcb->DataTransferLength = 0x800; | 346 | bcb->DataTransferLength = 0x800; |
| 347 | bcb->Flags =0x00; | 347 | bcb->Flags =0x00; |
| @@ -433,7 +433,7 @@ int ENE_Read_Data(struct us_data *us, void *buf, unsigned int length) | |||
| 433 | 433 | ||
| 434 | //printk("transport --- ENE_Read_Data\n"); | 434 | //printk("transport --- ENE_Read_Data\n"); |
| 435 | // set up the command wrapper | 435 | // set up the command wrapper |
| 436 | memset(bcb, 0, sizeof(bcb)); | 436 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 437 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 437 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 438 | bcb->DataTransferLength = length; | 438 | bcb->DataTransferLength = length; |
| 439 | bcb->Flags =0x80; | 439 | bcb->Flags =0x80; |
| @@ -470,7 +470,7 @@ int ENE_Write_Data(struct us_data *us, void *buf, unsigned int length) | |||
| 470 | 470 | ||
| 471 | //printk("transport --- ENE_Write_Data\n"); | 471 | //printk("transport --- ENE_Write_Data\n"); |
| 472 | // set up the command wrapper | 472 | // set up the command wrapper |
| 473 | memset(bcb, 0, sizeof(bcb)); | 473 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 474 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 474 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 475 | bcb->DataTransferLength = length; | 475 | bcb->DataTransferLength = length; |
| 476 | bcb->Flags =0x00; | 476 | bcb->Flags =0x00; |
diff --git a/drivers/staging/keucr/ms.c b/drivers/staging/keucr/ms.c index d4340a9da87d..9a3fdb4e4fe4 100644 --- a/drivers/staging/keucr/ms.c +++ b/drivers/staging/keucr/ms.c | |||
| @@ -15,7 +15,7 @@ int MS_ReaderCopyBlock(struct us_data *us, WORD oldphy, WORD newphy, WORD PhyBlo | |||
| 15 | if (result != USB_STOR_XFER_GOOD) | 15 | if (result != USB_STOR_XFER_GOOD) |
| 16 | return USB_STOR_TRANSPORT_ERROR; | 16 | return USB_STOR_TRANSPORT_ERROR; |
| 17 | 17 | ||
| 18 | memset(bcb, 0, sizeof(bcb)); | 18 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 19 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 19 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 20 | bcb->DataTransferLength = 0x200*len; | 20 | bcb->DataTransferLength = 0x200*len; |
| 21 | bcb->Flags = 0x00; | 21 | bcb->Flags = 0x00; |
| @@ -53,7 +53,7 @@ int MS_ReaderReadPage(struct us_data *us, DWORD PhyBlockAddr, BYTE PageNum, PDWO | |||
| 53 | return USB_STOR_TRANSPORT_ERROR; | 53 | return USB_STOR_TRANSPORT_ERROR; |
| 54 | 54 | ||
| 55 | // Read Page Data | 55 | // Read Page Data |
| 56 | memset(bcb, 0, sizeof(bcb)); | 56 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 57 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 57 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 58 | bcb->DataTransferLength = 0x200; | 58 | bcb->DataTransferLength = 0x200; |
| 59 | bcb->Flags = 0x80; | 59 | bcb->Flags = 0x80; |
| @@ -69,7 +69,7 @@ int MS_ReaderReadPage(struct us_data *us, DWORD PhyBlockAddr, BYTE PageNum, PDWO | |||
| 69 | return USB_STOR_TRANSPORT_ERROR; | 69 | return USB_STOR_TRANSPORT_ERROR; |
| 70 | 70 | ||
| 71 | // Read Extra Data | 71 | // Read Extra Data |
| 72 | memset(bcb, 0, sizeof(bcb)); | 72 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 73 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 73 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 74 | bcb->DataTransferLength = 0x4; | 74 | bcb->DataTransferLength = 0x4; |
| 75 | bcb->Flags = 0x80; | 75 | bcb->Flags = 0x80; |
| @@ -108,7 +108,7 @@ int MS_ReaderEraseBlock(struct us_data *us, DWORD PhyBlockAddr) | |||
| 108 | if (result != USB_STOR_XFER_GOOD) | 108 | if (result != USB_STOR_XFER_GOOD) |
| 109 | return USB_STOR_TRANSPORT_ERROR; | 109 | return USB_STOR_TRANSPORT_ERROR; |
| 110 | 110 | ||
| 111 | memset(bcb, 0, sizeof(bcb)); | 111 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 112 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 112 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 113 | bcb->DataTransferLength = 0x200; | 113 | bcb->DataTransferLength = 0x200; |
| 114 | bcb->Flags = 0x80; | 114 | bcb->Flags = 0x80; |
| @@ -673,7 +673,7 @@ int MS_LibReadExtraBlock(struct us_data *us, DWORD PhyBlock, BYTE PageNum, BYTE | |||
| 673 | //printk("MS_LibReadExtraBlock --- PhyBlock = %x, PageNum = %x, blen = %x\n", PhyBlock, PageNum, blen); | 673 | //printk("MS_LibReadExtraBlock --- PhyBlock = %x, PageNum = %x, blen = %x\n", PhyBlock, PageNum, blen); |
| 674 | 674 | ||
| 675 | // Read Extra Data | 675 | // Read Extra Data |
| 676 | memset(bcb, 0, sizeof(bcb)); | 676 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 677 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 677 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 678 | bcb->DataTransferLength = 0x4 * blen; | 678 | bcb->DataTransferLength = 0x4 * blen; |
| 679 | bcb->Flags = 0x80; | 679 | bcb->Flags = 0x80; |
| @@ -700,7 +700,7 @@ int MS_LibReadExtra(struct us_data *us, DWORD PhyBlock, BYTE PageNum, MS_LibType | |||
| 700 | BYTE ExtBuf[4]; | 700 | BYTE ExtBuf[4]; |
| 701 | 701 | ||
| 702 | //printk("MS_LibReadExtra --- PhyBlock = %x, PageNum = %x\n", PhyBlock, PageNum); | 702 | //printk("MS_LibReadExtra --- PhyBlock = %x, PageNum = %x\n", PhyBlock, PageNum); |
| 703 | memset(bcb, 0, sizeof(bcb)); | 703 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 704 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 704 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 705 | bcb->DataTransferLength = 0x4; | 705 | bcb->DataTransferLength = 0x4; |
| 706 | bcb->Flags = 0x80; | 706 | bcb->Flags = 0x80; |
| @@ -807,7 +807,7 @@ int MS_LibOverwriteExtra(struct us_data *us, DWORD PhyBlockAddr, BYTE PageNum, B | |||
| 807 | if (result != USB_STOR_XFER_GOOD) | 807 | if (result != USB_STOR_XFER_GOOD) |
| 808 | return USB_STOR_TRANSPORT_ERROR; | 808 | return USB_STOR_TRANSPORT_ERROR; |
| 809 | 809 | ||
| 810 | memset(bcb, 0, sizeof(bcb)); | 810 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 811 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 811 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 812 | bcb->DataTransferLength = 0x4; | 812 | bcb->DataTransferLength = 0x4; |
| 813 | bcb->Flags = 0x80; | 813 | bcb->Flags = 0x80; |
diff --git a/drivers/staging/keucr/msscsi.c b/drivers/staging/keucr/msscsi.c index ad0c5c629935..cb92d25acee0 100644 --- a/drivers/staging/keucr/msscsi.c +++ b/drivers/staging/keucr/msscsi.c | |||
| @@ -145,7 +145,7 @@ int MS_SCSI_Read(struct us_data *us, struct scsi_cmnd *srb) | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | // set up the command wrapper | 147 | // set up the command wrapper |
| 148 | memset(bcb, 0, sizeof(bcb)); | 148 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 149 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 149 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 150 | bcb->DataTransferLength = blenByte; | 150 | bcb->DataTransferLength = blenByte; |
| 151 | bcb->Flags = 0x80; | 151 | bcb->Flags = 0x80; |
| @@ -193,7 +193,7 @@ int MS_SCSI_Read(struct us_data *us, struct scsi_cmnd *srb) | |||
| 193 | blkno = phyblk * 0x20 + PageNum; | 193 | blkno = phyblk * 0x20 + PageNum; |
| 194 | 194 | ||
| 195 | // set up the command wrapper | 195 | // set up the command wrapper |
| 196 | memset(bcb, 0, sizeof(bcb)); | 196 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 197 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 197 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 198 | bcb->DataTransferLength = 0x200 * len; | 198 | bcb->DataTransferLength = 0x200 * len; |
| 199 | bcb->Flags = 0x80; | 199 | bcb->Flags = 0x80; |
| @@ -250,7 +250,7 @@ int MS_SCSI_Write(struct us_data *us, struct scsi_cmnd *srb) | |||
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | // set up the command wrapper | 252 | // set up the command wrapper |
| 253 | memset(bcb, 0, sizeof(bcb)); | 253 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 254 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 254 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 255 | bcb->DataTransferLength = blenByte; | 255 | bcb->DataTransferLength = blenByte; |
| 256 | bcb->Flags = 0x00; | 256 | bcb->Flags = 0x00; |
diff --git a/drivers/staging/keucr/sdscsi.c b/drivers/staging/keucr/sdscsi.c index 6c332f850ebe..d646507a3611 100644 --- a/drivers/staging/keucr/sdscsi.c +++ b/drivers/staging/keucr/sdscsi.c | |||
| @@ -152,7 +152,7 @@ int SD_SCSI_Read(struct us_data *us, struct scsi_cmnd *srb) | |||
| 152 | bnByte = bn; | 152 | bnByte = bn; |
| 153 | 153 | ||
| 154 | // set up the command wrapper | 154 | // set up the command wrapper |
| 155 | memset(bcb, 0, sizeof(bcb)); | 155 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 156 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 156 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 157 | bcb->DataTransferLength = blenByte; | 157 | bcb->DataTransferLength = blenByte; |
| 158 | bcb->Flags = 0x80; | 158 | bcb->Flags = 0x80; |
| @@ -192,7 +192,7 @@ int SD_SCSI_Write(struct us_data *us, struct scsi_cmnd *srb) | |||
| 192 | bnByte = bn; | 192 | bnByte = bn; |
| 193 | 193 | ||
| 194 | // set up the command wrapper | 194 | // set up the command wrapper |
| 195 | memset(bcb, 0, sizeof(bcb)); | 195 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 196 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 196 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 197 | bcb->DataTransferLength = blenByte; | 197 | bcb->DataTransferLength = blenByte; |
| 198 | bcb->Flags = 0x00; | 198 | bcb->Flags = 0x00; |
diff --git a/drivers/staging/keucr/smilsub.c b/drivers/staging/keucr/smilsub.c index 844b65988636..1b52535a388f 100644 --- a/drivers/staging/keucr/smilsub.c +++ b/drivers/staging/keucr/smilsub.c | |||
| @@ -266,7 +266,7 @@ int Ssfdc_D_ReadSect(struct us_data *us, BYTE *buf,BYTE *redundant) | |||
| 266 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; | 266 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; |
| 267 | 267 | ||
| 268 | // Read sect data | 268 | // Read sect data |
| 269 | memset(bcb, 0, sizeof(bcb)); | 269 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 270 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 270 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 271 | bcb->DataTransferLength = 0x200; | 271 | bcb->DataTransferLength = 0x200; |
| 272 | bcb->Flags = 0x80; | 272 | bcb->Flags = 0x80; |
| @@ -281,7 +281,7 @@ int Ssfdc_D_ReadSect(struct us_data *us, BYTE *buf,BYTE *redundant) | |||
| 281 | return USB_STOR_TRANSPORT_ERROR; | 281 | return USB_STOR_TRANSPORT_ERROR; |
| 282 | 282 | ||
| 283 | // Read redundant | 283 | // Read redundant |
| 284 | memset(bcb, 0, sizeof(bcb)); | 284 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 285 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 285 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 286 | bcb->DataTransferLength = 0x10; | 286 | bcb->DataTransferLength = 0x10; |
| 287 | bcb->Flags = 0x80; | 287 | bcb->Flags = 0x80; |
| @@ -319,7 +319,7 @@ int Ssfdc_D_ReadBlock(struct us_data *us, WORD count, BYTE *buf,BYTE *redundant) | |||
| 319 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; | 319 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; |
| 320 | 320 | ||
| 321 | // Read sect data | 321 | // Read sect data |
| 322 | memset(bcb, 0, sizeof(bcb)); | 322 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 323 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 323 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 324 | bcb->DataTransferLength = 0x200*count; | 324 | bcb->DataTransferLength = 0x200*count; |
| 325 | bcb->Flags = 0x80; | 325 | bcb->Flags = 0x80; |
| @@ -334,7 +334,7 @@ int Ssfdc_D_ReadBlock(struct us_data *us, WORD count, BYTE *buf,BYTE *redundant) | |||
| 334 | return USB_STOR_TRANSPORT_ERROR; | 334 | return USB_STOR_TRANSPORT_ERROR; |
| 335 | 335 | ||
| 336 | // Read redundant | 336 | // Read redundant |
| 337 | memset(bcb, 0, sizeof(bcb)); | 337 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 338 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 338 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 339 | bcb->DataTransferLength = 0x10; | 339 | bcb->DataTransferLength = 0x10; |
| 340 | bcb->Flags = 0x80; | 340 | bcb->Flags = 0x80; |
| @@ -536,7 +536,7 @@ int Ssfdc_D_CopyBlock(struct us_data *us, WORD count, BYTE *buf,BYTE *redundant) | |||
| 536 | WriteAddr = WriteAddr*(WORD)Ssfdc.MaxSectors; | 536 | WriteAddr = WriteAddr*(WORD)Ssfdc.MaxSectors; |
| 537 | 537 | ||
| 538 | // Write sect data | 538 | // Write sect data |
| 539 | memset(bcb, 0, sizeof(bcb)); | 539 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 540 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 540 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 541 | bcb->DataTransferLength = 0x200*count; | 541 | bcb->DataTransferLength = 0x200*count; |
| 542 | bcb->Flags = 0x00; | 542 | bcb->Flags = 0x00; |
| @@ -754,7 +754,7 @@ int Ssfdc_D_WriteSectForCopy(struct us_data *us, BYTE *buf, BYTE *redundant) | |||
| 754 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; | 754 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; |
| 755 | 755 | ||
| 756 | // Write sect data | 756 | // Write sect data |
| 757 | memset(bcb, 0, sizeof(bcb)); | 757 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 758 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 758 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 759 | bcb->DataTransferLength = 0x200; | 759 | bcb->DataTransferLength = 0x200; |
| 760 | bcb->Flags = 0x00; | 760 | bcb->Flags = 0x00; |
| @@ -791,7 +791,7 @@ int Ssfdc_D_EraseBlock(struct us_data *us) | |||
| 791 | addr=(WORD)Media.Zone*Ssfdc.MaxBlocks+Media.PhyBlock; | 791 | addr=(WORD)Media.Zone*Ssfdc.MaxBlocks+Media.PhyBlock; |
| 792 | addr=addr*(WORD)Ssfdc.MaxSectors; | 792 | addr=addr*(WORD)Ssfdc.MaxSectors; |
| 793 | 793 | ||
| 794 | memset(bcb, 0, sizeof(bcb)); | 794 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 795 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 795 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 796 | bcb->DataTransferLength = 0x200; | 796 | bcb->DataTransferLength = 0x200; |
| 797 | bcb->Flags = 0x80; | 797 | bcb->Flags = 0x80; |
| @@ -827,7 +827,7 @@ int Ssfdc_D_ReadRedtData(struct us_data *us, BYTE *redundant) | |||
| 827 | addr = (WORD)Media.Zone*Ssfdc.MaxBlocks+Media.PhyBlock; | 827 | addr = (WORD)Media.Zone*Ssfdc.MaxBlocks+Media.PhyBlock; |
| 828 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; | 828 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; |
| 829 | 829 | ||
| 830 | memset(bcb, 0, sizeof(bcb)); | 830 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 831 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 831 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 832 | bcb->DataTransferLength = 0x10; | 832 | bcb->DataTransferLength = 0x10; |
| 833 | bcb->Flags = 0x80; | 833 | bcb->Flags = 0x80; |
| @@ -870,7 +870,7 @@ int Ssfdc_D_WriteRedtData(struct us_data *us, BYTE *redundant) | |||
| 870 | addr = (WORD)Media.Zone*Ssfdc.MaxBlocks+Media.PhyBlock; | 870 | addr = (WORD)Media.Zone*Ssfdc.MaxBlocks+Media.PhyBlock; |
| 871 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; | 871 | addr = addr*(WORD)Ssfdc.MaxSectors+Media.Sector; |
| 872 | 872 | ||
| 873 | memset(bcb, 0, sizeof(bcb)); | 873 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
| 874 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 874 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
| 875 | bcb->DataTransferLength = 0x10; | 875 | bcb->DataTransferLength = 0x10; |
| 876 | bcb->Flags = 0x80; | 876 | bcb->Flags = 0x80; |
diff --git a/drivers/staging/keucr/transport.c b/drivers/staging/keucr/transport.c index fd98df643ab0..111160cce441 100644 --- a/drivers/staging/keucr/transport.c +++ b/drivers/staging/keucr/transport.c | |||
| @@ -40,7 +40,7 @@ static int usb_stor_msg_common(struct us_data *us, int timeout) | |||
| 40 | us->current_urb->error_count = 0; | 40 | us->current_urb->error_count = 0; |
| 41 | us->current_urb->status = 0; | 41 | us->current_urb->status = 0; |
| 42 | 42 | ||
| 43 | // us->current_urb->transfer_flags = URB_NO_SETUP_DMA_MAP; | 43 | us->current_urb->transfer_flags = 0; |
| 44 | if (us->current_urb->transfer_buffer == us->iobuf) | 44 | if (us->current_urb->transfer_buffer == us->iobuf) |
| 45 | us->current_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; | 45 | us->current_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; |
| 46 | us->current_urb->transfer_dma = us->iobuf_dma; | 46 | us->current_urb->transfer_dma = us->iobuf_dma; |
