diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-12 11:42:45 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-12 11:42:45 -0400 |
commit | 8083e1656211eb1487329923d592ee061d08d7b3 (patch) | |
tree | 92a44787484996b82365fab21f2dec960ab4f2d3 /drivers | |
parent | 6b12a3d35ff6cb09f8b777ab258ea1e32c680d62 (diff) | |
parent | 1802ca745280b916cda4090e459741b8c9b3e8d0 (diff) |
Merge branch 'upstream-fixes' into upstream
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/pci/aec62xx.c | 12 | ||||
-rw-r--r-- | drivers/ide/pci/serverworks.c | 10 | ||||
-rw-r--r-- | drivers/ide/pci/siimage.c | 6 | ||||
-rw-r--r-- | drivers/mmc/imxmmc.c | 69 | ||||
-rw-r--r-- | drivers/mmc/mmc.c | 55 | ||||
-rw-r--r-- | drivers/mmc/mmc_block.c | 60 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_chip.c | 61 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 43 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.h | 11 | ||||
-rw-r--r-- | drivers/scsi/ata_piix.c | 36 | ||||
-rw-r--r-- | drivers/scsi/sata_mv.c | 3 | ||||
-rw-r--r-- | drivers/scsi/sata_via.c | 1 | ||||
-rw-r--r-- | drivers/usb/input/hid-core.c | 4 | ||||
-rw-r--r-- | drivers/usb/input/usbtouchscreen.c | 2 | ||||
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.h | 5 |
17 files changed, 242 insertions, 139 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index a7c725f8bf64..f286079d233f 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -425,12 +425,12 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi | |||
425 | return d->init_setup(dev, d); | 425 | return d->init_setup(dev, d); |
426 | } | 426 | } |
427 | 427 | ||
428 | static const struct pci_device_id aec62xx_pci_tbl[] = { | 428 | static struct pci_device_id aec62xx_pci_tbl[] = { |
429 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF), 0 }, | 429 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
430 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860), 1 }, | 430 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, |
431 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R), 2 }, | 431 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, |
432 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865), 3 }, | 432 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, |
433 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R), 4 }, | 433 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, |
434 | { 0, }, | 434 | { 0, }, |
435 | }; | 435 | }; |
436 | MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl); | 436 | MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl); |
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 03677bff0d72..f063d954236c 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -649,11 +649,11 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device | |||
649 | } | 649 | } |
650 | 650 | ||
651 | static struct pci_device_id svwks_pci_tbl[] = { | 651 | static struct pci_device_id svwks_pci_tbl[] = { |
652 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, | 652 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
653 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 1}, | 653 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
654 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2}, | 654 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, |
655 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 3}, | 655 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, |
656 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 4}, | 656 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, |
657 | { 0, }, | 657 | { 0, }, |
658 | }; | 658 | }; |
659 | MODULE_DEVICE_TABLE(pci, svwks_pci_tbl); | 659 | MODULE_DEVICE_TABLE(pci, svwks_pci_tbl); |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 25ceb4a39ed2..20b392948f36 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -1082,10 +1082,10 @@ static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_devi | |||
1082 | } | 1082 | } |
1083 | 1083 | ||
1084 | static struct pci_device_id siimage_pci_tbl[] = { | 1084 | static struct pci_device_id siimage_pci_tbl[] = { |
1085 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680), 0}, | 1085 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
1086 | #ifdef CONFIG_BLK_DEV_IDE_SATA | 1086 | #ifdef CONFIG_BLK_DEV_IDE_SATA |
1087 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112), 1}, | 1087 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
1088 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA), 2}, | 1088 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, |
1089 | #endif | 1089 | #endif |
1090 | { 0, }, | 1090 | { 0, }, |
1091 | }; | 1091 | }; |
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c index 7ca9e95bdf89..fb6565b98f32 100644 --- a/drivers/mmc/imxmmc.c +++ b/drivers/mmc/imxmmc.c | |||
@@ -91,6 +91,8 @@ struct imxmci_host { | |||
91 | int dma_allocated; | 91 | int dma_allocated; |
92 | 92 | ||
93 | unsigned char actual_bus_width; | 93 | unsigned char actual_bus_width; |
94 | |||
95 | int prev_cmd_code; | ||
94 | }; | 96 | }; |
95 | 97 | ||
96 | #define IMXMCI_PEND_IRQ_b 0 | 98 | #define IMXMCI_PEND_IRQ_b 0 |
@@ -248,16 +250,14 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
248 | * partial FIFO fills and reads. The length has to be rounded up to burst size multiple. | 250 | * partial FIFO fills and reads. The length has to be rounded up to burst size multiple. |
249 | * This is required for SCR read at least. | 251 | * This is required for SCR read at least. |
250 | */ | 252 | */ |
251 | if (datasz < 64) { | 253 | if (datasz < 512) { |
252 | host->dma_size = datasz; | 254 | host->dma_size = datasz; |
253 | if (data->flags & MMC_DATA_READ) { | 255 | if (data->flags & MMC_DATA_READ) { |
254 | host->dma_dir = DMA_FROM_DEVICE; | 256 | host->dma_dir = DMA_FROM_DEVICE; |
255 | 257 | ||
256 | /* Hack to enable read SCR */ | 258 | /* Hack to enable read SCR */ |
257 | if(datasz < 16) { | 259 | MMC_NOB = 1; |
258 | MMC_NOB = 1; | 260 | MMC_BLK_LEN = 512; |
259 | MMC_BLK_LEN = 16; | ||
260 | } | ||
261 | } else { | 261 | } else { |
262 | host->dma_dir = DMA_TO_DEVICE; | 262 | host->dma_dir = DMA_TO_DEVICE; |
263 | } | 263 | } |
@@ -409,6 +409,9 @@ static void imxmci_finish_request(struct imxmci_host *host, struct mmc_request * | |||
409 | 409 | ||
410 | spin_unlock_irqrestore(&host->lock, flags); | 410 | spin_unlock_irqrestore(&host->lock, flags); |
411 | 411 | ||
412 | if(req && req->cmd) | ||
413 | host->prev_cmd_code = req->cmd->opcode; | ||
414 | |||
412 | host->req = NULL; | 415 | host->req = NULL; |
413 | host->cmd = NULL; | 416 | host->cmd = NULL; |
414 | host->data = NULL; | 417 | host->data = NULL; |
@@ -553,7 +556,6 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
553 | { | 556 | { |
554 | int i; | 557 | int i; |
555 | int burst_len; | 558 | int burst_len; |
556 | int flush_len; | ||
557 | int trans_done = 0; | 559 | int trans_done = 0; |
558 | unsigned int stat = *pstat; | 560 | unsigned int stat = *pstat; |
559 | 561 | ||
@@ -566,44 +568,43 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
566 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n", | 568 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n", |
567 | stat); | 569 | stat); |
568 | 570 | ||
571 | udelay(20); /* required for clocks < 8MHz*/ | ||
572 | |||
569 | if(host->dma_dir == DMA_FROM_DEVICE) { | 573 | if(host->dma_dir == DMA_FROM_DEVICE) { |
570 | imxmci_busy_wait_for_status(host, &stat, | 574 | imxmci_busy_wait_for_status(host, &stat, |
571 | STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, | 575 | STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, |
572 | 20, "imxmci_cpu_driven_data read"); | 576 | 50, "imxmci_cpu_driven_data read"); |
573 | 577 | ||
574 | while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && | 578 | while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && |
575 | (host->data_cnt < host->dma_size)) { | 579 | (host->data_cnt < 512)) { |
576 | if(burst_len >= host->dma_size - host->data_cnt) { | 580 | |
577 | flush_len = burst_len; | 581 | udelay(20); /* required for clocks < 8MHz*/ |
578 | burst_len = host->dma_size - host->data_cnt; | ||
579 | flush_len -= burst_len; | ||
580 | host->data_cnt = host->dma_size; | ||
581 | trans_done = 1; | ||
582 | } else { | ||
583 | flush_len = 0; | ||
584 | host->data_cnt += burst_len; | ||
585 | } | ||
586 | 582 | ||
587 | for(i = burst_len; i>=2 ; i-=2) { | 583 | for(i = burst_len; i>=2 ; i-=2) { |
588 | *(host->data_ptr++) = MMC_BUFFER_ACCESS; | 584 | u16 data; |
589 | udelay(20); /* required for clocks < 8MHz*/ | 585 | data = MMC_BUFFER_ACCESS; |
586 | udelay(10); /* required for clocks < 8MHz*/ | ||
587 | if(host->data_cnt+2 <= host->dma_size) { | ||
588 | *(host->data_ptr++) = data; | ||
589 | } else { | ||
590 | if(host->data_cnt < host->dma_size) | ||
591 | *(u8*)(host->data_ptr) = data; | ||
592 | } | ||
593 | host->data_cnt += 2; | ||
590 | } | 594 | } |
591 | 595 | ||
592 | if(i == 1) | ||
593 | *(u8*)(host->data_ptr) = MMC_BUFFER_ACCESS; | ||
594 | |||
595 | stat = MMC_STATUS; | 596 | stat = MMC_STATUS; |
596 | 597 | ||
597 | /* Flush extra bytes from FIFO */ | 598 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read %d burst %d STATUS = 0x%x\n", |
598 | while(flush_len && !(stat & STATUS_DATA_TRANS_DONE)){ | 599 | host->data_cnt, burst_len, stat); |
599 | i = MMC_BUFFER_ACCESS; | ||
600 | stat = MMC_STATUS; | ||
601 | stat &= ~STATUS_CRC_READ_ERR; /* Stupid but required there */ | ||
602 | } | ||
603 | |||
604 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read burst %d STATUS = 0x%x\n", | ||
605 | burst_len, stat); | ||
606 | } | 600 | } |
601 | |||
602 | if((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512)) | ||
603 | trans_done = 1; | ||
604 | |||
605 | if(host->dma_size & 0x1ff) | ||
606 | stat &= ~STATUS_CRC_READ_ERR; | ||
607 | |||
607 | } else { | 608 | } else { |
608 | imxmci_busy_wait_for_status(host, &stat, | 609 | imxmci_busy_wait_for_status(host, &stat, |
609 | STATUS_APPL_BUFF_FE, | 610 | STATUS_APPL_BUFF_FE, |
@@ -692,8 +693,8 @@ static void imxmci_tasklet_fnc(unsigned long data) | |||
692 | what, stat, MMC_INT_MASK); | 693 | what, stat, MMC_INT_MASK); |
693 | dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", | 694 | dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", |
694 | MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); | 695 | MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); |
695 | dev_err(mmc_dev(host->mmc), "CMD%d, bus %d-bit, dma_size = 0x%x\n", | 696 | dev_err(mmc_dev(host->mmc), "CMD%d, prevCMD%d, bus %d-bit, dma_size = 0x%x\n", |
696 | host->cmd?host->cmd->opcode:0, 1<<host->actual_bus_width, host->dma_size); | 697 | host->cmd?host->cmd->opcode:0, host->prev_cmd_code, 1<<host->actual_bus_width, host->dma_size); |
697 | } | 698 | } |
698 | 699 | ||
699 | if(!host->present || timeout) | 700 | if(!host->present || timeout) |
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 33525bdf2ab6..74eaaee66de0 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -247,6 +247,55 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, unsigned int rca, | |||
247 | 247 | ||
248 | EXPORT_SYMBOL(mmc_wait_for_app_cmd); | 248 | EXPORT_SYMBOL(mmc_wait_for_app_cmd); |
249 | 249 | ||
250 | /** | ||
251 | * mmc_set_data_timeout - set the timeout for a data command | ||
252 | * @data: data phase for command | ||
253 | * @card: the MMC card associated with the data transfer | ||
254 | * @write: flag to differentiate reads from writes | ||
255 | */ | ||
256 | void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card, | ||
257 | int write) | ||
258 | { | ||
259 | unsigned int mult; | ||
260 | |||
261 | /* | ||
262 | * SD cards use a 100 multiplier rather than 10 | ||
263 | */ | ||
264 | mult = mmc_card_sd(card) ? 100 : 10; | ||
265 | |||
266 | /* | ||
267 | * Scale up the multiplier (and therefore the timeout) by | ||
268 | * the r2w factor for writes. | ||
269 | */ | ||
270 | if (write) | ||
271 | mult <<= card->csd.r2w_factor; | ||
272 | |||
273 | data->timeout_ns = card->csd.tacc_ns * mult; | ||
274 | data->timeout_clks = card->csd.tacc_clks * mult; | ||
275 | |||
276 | /* | ||
277 | * SD cards also have an upper limit on the timeout. | ||
278 | */ | ||
279 | if (mmc_card_sd(card)) { | ||
280 | unsigned int timeout_us, limit_us; | ||
281 | |||
282 | timeout_us = data->timeout_ns / 1000; | ||
283 | timeout_us += data->timeout_clks * 1000 / | ||
284 | (card->host->ios.clock / 1000); | ||
285 | |||
286 | if (write) | ||
287 | limit_us = 250000; | ||
288 | else | ||
289 | limit_us = 100000; | ||
290 | |||
291 | if (timeout_us > limit_us) { | ||
292 | data->timeout_ns = limit_us * 1000; | ||
293 | data->timeout_clks = 0; | ||
294 | } | ||
295 | } | ||
296 | } | ||
297 | EXPORT_SYMBOL(mmc_set_data_timeout); | ||
298 | |||
250 | static int mmc_select_card(struct mmc_host *host, struct mmc_card *card); | 299 | static int mmc_select_card(struct mmc_host *host, struct mmc_card *card); |
251 | 300 | ||
252 | /** | 301 | /** |
@@ -908,11 +957,9 @@ static void mmc_read_scrs(struct mmc_host *host) | |||
908 | { | 957 | { |
909 | int err; | 958 | int err; |
910 | struct mmc_card *card; | 959 | struct mmc_card *card; |
911 | |||
912 | struct mmc_request mrq; | 960 | struct mmc_request mrq; |
913 | struct mmc_command cmd; | 961 | struct mmc_command cmd; |
914 | struct mmc_data data; | 962 | struct mmc_data data; |
915 | |||
916 | struct scatterlist sg; | 963 | struct scatterlist sg; |
917 | 964 | ||
918 | list_for_each_entry(card, &host->cards, node) { | 965 | list_for_each_entry(card, &host->cards, node) { |
@@ -947,8 +994,8 @@ static void mmc_read_scrs(struct mmc_host *host) | |||
947 | 994 | ||
948 | memset(&data, 0, sizeof(struct mmc_data)); | 995 | memset(&data, 0, sizeof(struct mmc_data)); |
949 | 996 | ||
950 | data.timeout_ns = card->csd.tacc_ns * 10; | 997 | mmc_set_data_timeout(&data, card, 0); |
951 | data.timeout_clks = card->csd.tacc_clks * 10; | 998 | |
952 | data.blksz_bits = 3; | 999 | data.blksz_bits = 3; |
953 | data.blksz = 1 << 3; | 1000 | data.blksz = 1 << 3; |
954 | data.blocks = 1; | 1001 | data.blocks = 1; |
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index 115cc21094b9..a0e0dad1b419 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | 31 | ||
32 | #include <linux/mmc/card.h> | 32 | #include <linux/mmc/card.h> |
33 | #include <linux/mmc/host.h> | ||
33 | #include <linux/mmc/protocol.h> | 34 | #include <linux/mmc/protocol.h> |
34 | 35 | ||
35 | #include <asm/system.h> | 36 | #include <asm/system.h> |
@@ -171,8 +172,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
171 | 172 | ||
172 | brq.cmd.arg = req->sector << 9; | 173 | brq.cmd.arg = req->sector << 9; |
173 | brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; | 174 | brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; |
174 | brq.data.timeout_ns = card->csd.tacc_ns * 10; | ||
175 | brq.data.timeout_clks = card->csd.tacc_clks * 10; | ||
176 | brq.data.blksz_bits = md->block_bits; | 175 | brq.data.blksz_bits = md->block_bits; |
177 | brq.data.blksz = 1 << md->block_bits; | 176 | brq.data.blksz = 1 << md->block_bits; |
178 | brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); | 177 | brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); |
@@ -180,6 +179,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
180 | brq.stop.arg = 0; | 179 | brq.stop.arg = 0; |
181 | brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; | 180 | brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; |
182 | 181 | ||
182 | mmc_set_data_timeout(&brq.data, card, rq_data_dir(req) != READ); | ||
183 | |||
183 | if (rq_data_dir(req) == READ) { | 184 | if (rq_data_dir(req) == READ) { |
184 | brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; | 185 | brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; |
185 | brq.data.flags |= MMC_DATA_READ; | 186 | brq.data.flags |= MMC_DATA_READ; |
@@ -187,12 +188,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
187 | brq.cmd.opcode = MMC_WRITE_BLOCK; | 188 | brq.cmd.opcode = MMC_WRITE_BLOCK; |
188 | brq.data.flags |= MMC_DATA_WRITE; | 189 | brq.data.flags |= MMC_DATA_WRITE; |
189 | brq.data.blocks = 1; | 190 | brq.data.blocks = 1; |
190 | |||
191 | /* | ||
192 | * Scale up the timeout by the r2w factor | ||
193 | */ | ||
194 | brq.data.timeout_ns <<= card->csd.r2w_factor; | ||
195 | brq.data.timeout_clks <<= card->csd.r2w_factor; | ||
196 | } | 191 | } |
197 | 192 | ||
198 | if (brq.data.blocks > 1) { | 193 | if (brq.data.blocks > 1) { |
@@ -324,52 +319,11 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) | |||
324 | md->read_only = mmc_blk_readonly(card); | 319 | md->read_only = mmc_blk_readonly(card); |
325 | 320 | ||
326 | /* | 321 | /* |
327 | * Figure out a workable block size. MMC cards have: | 322 | * Both SD and MMC specifications state (although a bit |
328 | * - two block sizes, one for read and one for write. | 323 | * unclearly in the MMC case) that a block size of 512 |
329 | * - may support partial reads and/or writes | 324 | * bytes must always be supported by the card. |
330 | * (allows block sizes smaller than specified) | ||
331 | */ | ||
332 | md->block_bits = card->csd.read_blkbits; | ||
333 | if (card->csd.write_blkbits != card->csd.read_blkbits) { | ||
334 | if (card->csd.write_blkbits < card->csd.read_blkbits && | ||
335 | card->csd.read_partial) { | ||
336 | /* | ||
337 | * write block size is smaller than read block | ||
338 | * size, but we support partial reads, so choose | ||
339 | * the smaller write block size. | ||
340 | */ | ||
341 | md->block_bits = card->csd.write_blkbits; | ||
342 | } else if (card->csd.write_blkbits > card->csd.read_blkbits && | ||
343 | card->csd.write_partial) { | ||
344 | /* | ||
345 | * read block size is smaller than write block | ||
346 | * size, but we support partial writes. Use read | ||
347 | * block size. | ||
348 | */ | ||
349 | } else { | ||
350 | /* | ||
351 | * We don't support this configuration for writes. | ||
352 | */ | ||
353 | printk(KERN_ERR "%s: unable to select block size for " | ||
354 | "writing (rb%u wb%u rp%u wp%u)\n", | ||
355 | mmc_card_id(card), | ||
356 | 1 << card->csd.read_blkbits, | ||
357 | 1 << card->csd.write_blkbits, | ||
358 | card->csd.read_partial, | ||
359 | card->csd.write_partial); | ||
360 | md->read_only = 1; | ||
361 | } | ||
362 | } | ||
363 | |||
364 | /* | ||
365 | * Refuse to allow block sizes smaller than 512 bytes. | ||
366 | */ | 325 | */ |
367 | if (md->block_bits < 9) { | 326 | md->block_bits = 9; |
368 | printk(KERN_ERR "%s: unable to support block size %u\n", | ||
369 | mmc_card_id(card), 1 << md->block_bits); | ||
370 | ret = -EINVAL; | ||
371 | goto err_kfree; | ||
372 | } | ||
373 | 327 | ||
374 | md->disk = alloc_disk(1 << MMC_SHIFT); | 328 | md->disk = alloc_disk(1 << MMC_SHIFT); |
375 | if (md->disk == NULL) { | 329 | if (md->disk == NULL) { |
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 58419985e00f..7c4e32cf0d47 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c | |||
@@ -1435,9 +1435,43 @@ static int ofdm_qual_db(u8 status_quality, u8 rate, unsigned int size) | |||
1435 | break; | 1435 | break; |
1436 | } | 1436 | } |
1437 | 1437 | ||
1438 | switch (rate) { | ||
1439 | case ZD_OFDM_RATE_6M: | ||
1440 | case ZD_OFDM_RATE_9M: | ||
1441 | i += 3; | ||
1442 | break; | ||
1443 | case ZD_OFDM_RATE_12M: | ||
1444 | case ZD_OFDM_RATE_18M: | ||
1445 | i += 5; | ||
1446 | break; | ||
1447 | case ZD_OFDM_RATE_24M: | ||
1448 | case ZD_OFDM_RATE_36M: | ||
1449 | i += 9; | ||
1450 | break; | ||
1451 | case ZD_OFDM_RATE_48M: | ||
1452 | case ZD_OFDM_RATE_54M: | ||
1453 | i += 15; | ||
1454 | break; | ||
1455 | default: | ||
1456 | return -EINVAL; | ||
1457 | } | ||
1458 | |||
1438 | return i; | 1459 | return i; |
1439 | } | 1460 | } |
1440 | 1461 | ||
1462 | static int ofdm_qual_percent(u8 status_quality, u8 rate, unsigned int size) | ||
1463 | { | ||
1464 | int r; | ||
1465 | |||
1466 | r = ofdm_qual_db(status_quality, rate, size); | ||
1467 | ZD_ASSERT(r >= 0); | ||
1468 | if (r < 0) | ||
1469 | r = 0; | ||
1470 | |||
1471 | r = (r * 100)/29; | ||
1472 | return r <= 100 ? r : 100; | ||
1473 | } | ||
1474 | |||
1441 | static unsigned int log10times100(unsigned int x) | 1475 | static unsigned int log10times100(unsigned int x) |
1442 | { | 1476 | { |
1443 | static const u8 log10[] = { | 1477 | static const u8 log10[] = { |
@@ -1481,31 +1515,28 @@ static int cck_snr_db(u8 status_quality) | |||
1481 | return r; | 1515 | return r; |
1482 | } | 1516 | } |
1483 | 1517 | ||
1484 | static int rx_qual_db(const void *rx_frame, unsigned int size, | 1518 | static int cck_qual_percent(u8 status_quality) |
1485 | const struct rx_status *status) | ||
1486 | { | 1519 | { |
1487 | return (status->frame_status&ZD_RX_OFDM) ? | 1520 | int r; |
1488 | ofdm_qual_db(status->signal_quality_ofdm, | 1521 | |
1489 | zd_ofdm_plcp_header_rate(rx_frame), | 1522 | r = cck_snr_db(status_quality); |
1490 | size) : | 1523 | r = (100*r)/17; |
1491 | cck_snr_db(status->signal_quality_cck); | 1524 | return r <= 100 ? r : 100; |
1492 | } | 1525 | } |
1493 | 1526 | ||
1494 | u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size, | 1527 | u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size, |
1495 | const struct rx_status *status) | 1528 | const struct rx_status *status) |
1496 | { | 1529 | { |
1497 | int r = rx_qual_db(rx_frame, size, status); | 1530 | return (status->frame_status&ZD_RX_OFDM) ? |
1498 | if (r < 0) | 1531 | ofdm_qual_percent(status->signal_quality_ofdm, |
1499 | r = 0; | 1532 | zd_ofdm_plcp_header_rate(rx_frame), |
1500 | r = (r * 100) / 14; | 1533 | size) : |
1501 | if (r > 100) | 1534 | cck_qual_percent(status->signal_quality_cck); |
1502 | r = 100; | ||
1503 | return r; | ||
1504 | } | 1535 | } |
1505 | 1536 | ||
1506 | u8 zd_rx_strength_percent(u8 rssi) | 1537 | u8 zd_rx_strength_percent(u8 rssi) |
1507 | { | 1538 | { |
1508 | int r = (rssi*100) / 30; | 1539 | int r = (rssi*100) / 41; |
1509 | if (r > 100) | 1540 | if (r > 100) |
1510 | r = 100; | 1541 | r = 100; |
1511 | return (u8) r; | 1542 | return (u8) r; |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 0eda534a648c..0ddccf893989 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -814,13 +814,25 @@ static int filter_rx(struct ieee80211_device *ieee, | |||
814 | return -EINVAL; | 814 | return -EINVAL; |
815 | } | 815 | } |
816 | 816 | ||
817 | static void update_qual_rssi(struct zd_mac *mac, u8 qual_percent, u8 rssi) | 817 | static void update_qual_rssi(struct zd_mac *mac, |
818 | const u8 *buffer, unsigned int length, | ||
819 | u8 qual_percent, u8 rssi_percent) | ||
818 | { | 820 | { |
819 | unsigned long flags; | 821 | unsigned long flags; |
822 | struct ieee80211_hdr_3addr *hdr; | ||
823 | int i; | ||
824 | |||
825 | hdr = (struct ieee80211_hdr_3addr *)buffer; | ||
826 | if (length < offsetof(struct ieee80211_hdr_3addr, addr3)) | ||
827 | return; | ||
828 | if (memcmp(hdr->addr2, zd_mac_to_ieee80211(mac)->bssid, ETH_ALEN) != 0) | ||
829 | return; | ||
820 | 830 | ||
821 | spin_lock_irqsave(&mac->lock, flags); | 831 | spin_lock_irqsave(&mac->lock, flags); |
822 | mac->qual_average = (7 * mac->qual_average + qual_percent) / 8; | 832 | i = mac->stats_count % ZD_MAC_STATS_BUFFER_SIZE; |
823 | mac->rssi_average = (7 * mac->rssi_average + rssi) / 8; | 833 | mac->qual_buffer[i] = qual_percent; |
834 | mac->rssi_buffer[i] = rssi_percent; | ||
835 | mac->stats_count++; | ||
824 | spin_unlock_irqrestore(&mac->lock, flags); | 836 | spin_unlock_irqrestore(&mac->lock, flags); |
825 | } | 837 | } |
826 | 838 | ||
@@ -851,7 +863,6 @@ static int fill_rx_stats(struct ieee80211_rx_stats *stats, | |||
851 | if (stats->rate) | 863 | if (stats->rate) |
852 | stats->mask |= IEEE80211_STATMASK_RATE; | 864 | stats->mask |= IEEE80211_STATMASK_RATE; |
853 | 865 | ||
854 | update_qual_rssi(mac, stats->signal, stats->rssi); | ||
855 | return 0; | 866 | return 0; |
856 | } | 867 | } |
857 | 868 | ||
@@ -875,6 +886,8 @@ int zd_mac_rx(struct zd_mac *mac, const u8 *buffer, unsigned int length) | |||
875 | sizeof(struct rx_status); | 886 | sizeof(struct rx_status); |
876 | buffer += ZD_PLCP_HEADER_SIZE; | 887 | buffer += ZD_PLCP_HEADER_SIZE; |
877 | 888 | ||
889 | update_qual_rssi(mac, buffer, length, stats.signal, stats.rssi); | ||
890 | |||
878 | r = filter_rx(ieee, buffer, length, &stats); | 891 | r = filter_rx(ieee, buffer, length, &stats); |
879 | if (r <= 0) | 892 | if (r <= 0) |
880 | return r; | 893 | return r; |
@@ -979,17 +992,31 @@ struct iw_statistics *zd_mac_get_wireless_stats(struct net_device *ndev) | |||
979 | { | 992 | { |
980 | struct zd_mac *mac = zd_netdev_mac(ndev); | 993 | struct zd_mac *mac = zd_netdev_mac(ndev); |
981 | struct iw_statistics *iw_stats = &mac->iw_stats; | 994 | struct iw_statistics *iw_stats = &mac->iw_stats; |
995 | unsigned int i, count, qual_total, rssi_total; | ||
982 | 996 | ||
983 | memset(iw_stats, 0, sizeof(struct iw_statistics)); | 997 | memset(iw_stats, 0, sizeof(struct iw_statistics)); |
984 | /* We are not setting the status, because ieee->state is not updated | 998 | /* We are not setting the status, because ieee->state is not updated |
985 | * at all and this driver doesn't track authentication state. | 999 | * at all and this driver doesn't track authentication state. |
986 | */ | 1000 | */ |
987 | spin_lock_irq(&mac->lock); | 1001 | spin_lock_irq(&mac->lock); |
988 | iw_stats->qual.qual = mac->qual_average; | 1002 | count = mac->stats_count < ZD_MAC_STATS_BUFFER_SIZE ? |
989 | iw_stats->qual.level = mac->rssi_average; | 1003 | mac->stats_count : ZD_MAC_STATS_BUFFER_SIZE; |
990 | iw_stats->qual.updated = IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED| | 1004 | qual_total = rssi_total = 0; |
991 | IW_QUAL_NOISE_INVALID; | 1005 | for (i = 0; i < count; i++) { |
1006 | qual_total += mac->qual_buffer[i]; | ||
1007 | rssi_total += mac->rssi_buffer[i]; | ||
1008 | } | ||
992 | spin_unlock_irq(&mac->lock); | 1009 | spin_unlock_irq(&mac->lock); |
1010 | iw_stats->qual.updated = IW_QUAL_NOISE_INVALID; | ||
1011 | if (count > 0) { | ||
1012 | iw_stats->qual.qual = qual_total / count; | ||
1013 | iw_stats->qual.level = rssi_total / count; | ||
1014 | iw_stats->qual.updated |= | ||
1015 | IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED; | ||
1016 | } else { | ||
1017 | iw_stats->qual.updated |= | ||
1018 | IW_QUAL_QUAL_INVALID|IW_QUAL_LEVEL_INVALID; | ||
1019 | } | ||
993 | /* TODO: update counter */ | 1020 | /* TODO: update counter */ |
994 | return iw_stats; | 1021 | return iw_stats; |
995 | } | 1022 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h index 082bcf8ec8dc..2b596cc8a41a 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.h +++ b/drivers/net/wireless/zd1211rw/zd_mac.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* zd_mac.c | 1 | /* zd_mac.h |
2 | * | 2 | * |
3 | * This program is free software; you can redistribute it and/or modify | 3 | * This program is free software; you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
@@ -87,9 +87,9 @@ struct rx_length_info { | |||
87 | #define RX_LENGTH_INFO_TAG 0x697e | 87 | #define RX_LENGTH_INFO_TAG 0x697e |
88 | 88 | ||
89 | struct rx_status { | 89 | struct rx_status { |
90 | u8 signal_quality_cck; | ||
90 | /* rssi */ | 91 | /* rssi */ |
91 | u8 signal_strength; | 92 | u8 signal_strength; |
92 | u8 signal_quality_cck; | ||
93 | u8 signal_quality_ofdm; | 93 | u8 signal_quality_ofdm; |
94 | u8 decryption_type; | 94 | u8 decryption_type; |
95 | u8 frame_status; | 95 | u8 frame_status; |
@@ -120,14 +120,17 @@ enum mac_flags { | |||
120 | MAC_FIXED_CHANNEL = 0x01, | 120 | MAC_FIXED_CHANNEL = 0x01, |
121 | }; | 121 | }; |
122 | 122 | ||
123 | #define ZD_MAC_STATS_BUFFER_SIZE 16 | ||
124 | |||
123 | struct zd_mac { | 125 | struct zd_mac { |
124 | struct zd_chip chip; | 126 | struct zd_chip chip; |
125 | spinlock_t lock; | 127 | spinlock_t lock; |
126 | struct net_device *netdev; | 128 | struct net_device *netdev; |
127 | /* Unlocked reading possible */ | 129 | /* Unlocked reading possible */ |
128 | struct iw_statistics iw_stats; | 130 | struct iw_statistics iw_stats; |
129 | u8 qual_average; | 131 | unsigned int stats_count; |
130 | u8 rssi_average; | 132 | u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE]; |
133 | u8 rssi_buffer[ZD_MAC_STATS_BUFFER_SIZE]; | ||
131 | u8 regdomain; | 134 | u8 regdomain; |
132 | u8 default_regdomain; | 135 | u8 default_regdomain; |
133 | u8 requested_channel; | 136 | u8 requested_channel; |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 2d20caf377f5..a9bb3cb7e89b 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -123,7 +123,8 @@ enum { | |||
123 | ich6_sata = 4, | 123 | ich6_sata = 4, |
124 | ich6_sata_ahci = 5, | 124 | ich6_sata_ahci = 5, |
125 | ich6m_sata_ahci = 6, | 125 | ich6m_sata_ahci = 6, |
126 | ich8_sata_ahci = 7, | 126 | ich7m_sata_ahci = 7, |
127 | ich8_sata_ahci = 8, | ||
127 | 128 | ||
128 | /* constants for mapping table */ | 129 | /* constants for mapping table */ |
129 | P0 = 0, /* port 0 */ | 130 | P0 = 0, /* port 0 */ |
@@ -188,7 +189,7 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
188 | /* 82801GB/GR/GH (ICH7, identical to ICH6) */ | 189 | /* 82801GB/GR/GH (ICH7, identical to ICH6) */ |
189 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 190 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
190 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ | 191 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ |
191 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, | 192 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7m_sata_ahci }, |
192 | /* Enterprise Southbridge 2 (where's the datasheet?) */ | 193 | /* Enterprise Southbridge 2 (where's the datasheet?) */ |
193 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 194 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
194 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ | 195 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ |
@@ -336,6 +337,24 @@ static const struct piix_map_db ich6m_map_db = { | |||
336 | }, | 337 | }, |
337 | }; | 338 | }; |
338 | 339 | ||
340 | static const struct piix_map_db ich7m_map_db = { | ||
341 | .mask = 0x3, | ||
342 | .port_enable = 0x5, | ||
343 | .present_shift = 4, | ||
344 | |||
345 | /* Map 01b isn't specified in the doc but some notebooks use | ||
346 | * it anyway. ATM, the only case spotted carries subsystem ID | ||
347 | * 1025:0107. This is the only difference from ich6m. | ||
348 | */ | ||
349 | .map = { | ||
350 | /* PM PS SM SS MAP */ | ||
351 | { P0, P2, RV, RV }, /* 00b */ | ||
352 | { IDE, IDE, P1, P3 }, /* 01b */ | ||
353 | { P0, P2, IDE, IDE }, /* 10b */ | ||
354 | { RV, RV, RV, RV }, | ||
355 | }, | ||
356 | }; | ||
357 | |||
339 | static const struct piix_map_db ich8_map_db = { | 358 | static const struct piix_map_db ich8_map_db = { |
340 | .mask = 0x3, | 359 | .mask = 0x3, |
341 | .port_enable = 0x3, | 360 | .port_enable = 0x3, |
@@ -355,6 +374,7 @@ static const struct piix_map_db *piix_map_db_table[] = { | |||
355 | [ich6_sata] = &ich6_map_db, | 374 | [ich6_sata] = &ich6_map_db, |
356 | [ich6_sata_ahci] = &ich6_map_db, | 375 | [ich6_sata_ahci] = &ich6_map_db, |
357 | [ich6m_sata_ahci] = &ich6m_map_db, | 376 | [ich6m_sata_ahci] = &ich6m_map_db, |
377 | [ich7m_sata_ahci] = &ich7m_map_db, | ||
358 | [ich8_sata_ahci] = &ich8_map_db, | 378 | [ich8_sata_ahci] = &ich8_map_db, |
359 | }; | 379 | }; |
360 | 380 | ||
@@ -444,6 +464,18 @@ static struct ata_port_info piix_port_info[] = { | |||
444 | .port_ops = &piix_sata_ops, | 464 | .port_ops = &piix_sata_ops, |
445 | }, | 465 | }, |
446 | 466 | ||
467 | /* ich7m_sata_ahci */ | ||
468 | { | ||
469 | .sht = &piix_sht, | ||
470 | .host_flags = ATA_FLAG_SATA | | ||
471 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | ||
472 | PIIX_FLAG_AHCI, | ||
473 | .pio_mask = 0x1f, /* pio0-4 */ | ||
474 | .mwdma_mask = 0x07, /* mwdma0-2 */ | ||
475 | .udma_mask = 0x7f, /* udma0-6 */ | ||
476 | .port_ops = &piix_sata_ops, | ||
477 | }, | ||
478 | |||
447 | /* ich8_sata_ahci */ | 479 | /* ich8_sata_ahci */ |
448 | { | 480 | { |
449 | .sht = &piix_sht, | 481 | .sht = &piix_sht, |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 1053c7c76b7d..fa38a413d16b 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -1961,8 +1961,7 @@ comreset_retry: | |||
1961 | timeout = jiffies + msecs_to_jiffies(200); | 1961 | timeout = jiffies + msecs_to_jiffies(200); |
1962 | do { | 1962 | do { |
1963 | sata_scr_read(ap, SCR_STATUS, &sstatus); | 1963 | sata_scr_read(ap, SCR_STATUS, &sstatus); |
1964 | sstatus &= 0x3; | 1964 | if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0)) |
1965 | if ((sstatus == 3) || (sstatus == 0)) | ||
1966 | break; | 1965 | break; |
1967 | 1966 | ||
1968 | __msleep(1, can_sleep); | 1967 | __msleep(1, can_sleep); |
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index 01d40369a8a5..a3727af8b9c1 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c | |||
@@ -77,6 +77,7 @@ static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | |||
77 | static void vt6420_error_handler(struct ata_port *ap); | 77 | static void vt6420_error_handler(struct ata_port *ap); |
78 | 78 | ||
79 | static const struct pci_device_id svia_pci_tbl[] = { | 79 | static const struct pci_device_id svia_pci_tbl[] = { |
80 | { 0x1106, 0x0591, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, | ||
80 | { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, | 81 | { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, |
81 | { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 }, | 82 | { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 }, |
82 | 83 | ||
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index acb24c6219d9..a2c56b2de589 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
@@ -1444,7 +1444,7 @@ void hid_init_reports(struct hid_device *hid) | |||
1444 | #define USB_DEVICE_ID_GTCO_402 0x0402 | 1444 | #define USB_DEVICE_ID_GTCO_402 0x0402 |
1445 | #define USB_DEVICE_ID_GTCO_403 0x0403 | 1445 | #define USB_DEVICE_ID_GTCO_403 0x0403 |
1446 | #define USB_DEVICE_ID_GTCO_404 0x0404 | 1446 | #define USB_DEVICE_ID_GTCO_404 0x0404 |
1447 | #define USB_DEVICE_ID_GTCO_404 0x0405 | 1447 | #define USB_DEVICE_ID_GTCO_405 0x0405 |
1448 | #define USB_DEVICE_ID_GTCO_500 0x0500 | 1448 | #define USB_DEVICE_ID_GTCO_500 0x0500 |
1449 | #define USB_DEVICE_ID_GTCO_501 0x0501 | 1449 | #define USB_DEVICE_ID_GTCO_501 0x0501 |
1450 | #define USB_DEVICE_ID_GTCO_502 0x0502 | 1450 | #define USB_DEVICE_ID_GTCO_502 0x0502 |
@@ -1657,7 +1657,7 @@ static const struct hid_blacklist { | |||
1657 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE }, | 1657 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE }, |
1658 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE }, | 1658 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE }, |
1659 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, | 1659 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, |
1660 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, | 1660 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_405, HID_QUIRK_IGNORE }, |
1661 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE }, | 1661 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE }, |
1662 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE }, | 1662 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE }, |
1663 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE }, | 1663 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE }, |
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c index 3b175aa482cd..a338bf4c2d78 100644 --- a/drivers/usb/input/usbtouchscreen.c +++ b/drivers/usb/input/usbtouchscreen.c | |||
@@ -286,7 +286,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) | |||
286 | static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) | 286 | static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) |
287 | { | 287 | { |
288 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); | 288 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); |
289 | *x = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); | 289 | *y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); |
290 | *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); | 290 | *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); |
291 | *touch = ~pkt[7] & 0x20; | 291 | *touch = ~pkt[7] & 0x20; |
292 | 292 | ||
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 738bd7c7451f..e16582f3733c 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
@@ -3435,6 +3435,8 @@ static void sisusb_disconnect(struct usb_interface *intf) | |||
3435 | 3435 | ||
3436 | static struct usb_device_id sisusb_table [] = { | 3436 | static struct usb_device_id sisusb_table [] = { |
3437 | { USB_DEVICE(0x0711, 0x0900) }, | 3437 | { USB_DEVICE(0x0711, 0x0900) }, |
3438 | { USB_DEVICE(0x0711, 0x0901) }, | ||
3439 | { USB_DEVICE(0x0711, 0x0902) }, | ||
3438 | { USB_DEVICE(0x182d, 0x021c) }, | 3440 | { USB_DEVICE(0x182d, 0x021c) }, |
3439 | { USB_DEVICE(0x182d, 0x0269) }, | 3441 | { USB_DEVICE(0x182d, 0x0269) }, |
3440 | { } | 3442 | { } |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 15945e806f03..c6115aa1b445 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -506,6 +506,7 @@ static struct usb_device_id id_table_combined [] = { | |||
506 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, | 506 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, |
507 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, | 507 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, |
508 | { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, | 508 | { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, |
509 | { USB_DEVICE(FTDI_VID, FTDI_GAMMA_SCOUT_PID) }, | ||
509 | { }, /* Optional parameter entry */ | 510 | { }, /* Optional parameter entry */ |
510 | { } /* Terminating entry */ | 511 | { } /* Terminating entry */ |
511 | }; | 512 | }; |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 8888cd80a491..77299996f7ee 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -467,6 +467,11 @@ | |||
467 | #define TESTO_VID 0x128D | 467 | #define TESTO_VID 0x128D |
468 | #define TESTO_USB_INTERFACE_PID 0x0001 | 468 | #define TESTO_USB_INTERFACE_PID 0x0001 |
469 | 469 | ||
470 | /* | ||
471 | * Gamma Scout (http://gamma-scout.com/). Submitted by rsc@runtux.com. | ||
472 | */ | ||
473 | #define FTDI_GAMMA_SCOUT_PID 0xD678 /* Gamma Scout online */ | ||
474 | |||
470 | /* Commands */ | 475 | /* Commands */ |
471 | #define FTDI_SIO_RESET 0 /* Reset the port */ | 476 | #define FTDI_SIO_RESET 0 /* Reset the port */ |
472 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ | 477 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ |