From 96ce1b6dc5824cc6027c954b9a2e4717c70e01b5 Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Fri, 28 Mar 2008 10:51:33 -0500 Subject: [POWERPC] sata_fsl: reduce compatibility to fsl,pq-sata as prescribed in Documentation/powerpc/booting-without-of.txt. Signed-off-by: Kim Phillips Acked-by: Jeff Garzik Signed-off-by: Kumar Gala --- drivers/ata/sata_fsl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 07791a7a48a..4c198551154 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -1348,10 +1348,7 @@ static int sata_fsl_remove(struct of_device *ofdev) static struct of_device_id fsl_sata_match[] = { { - .compatible = "fsl,mpc8315-sata", - }, - { - .compatible = "fsl,mpc8379-sata", + .compatible = "fsl,pq-sata", }, {}, }; -- cgit v1.2.3 From 049c9d45531d9825bf737891163a794fca1421c5 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Mon, 31 Mar 2008 11:13:21 -0500 Subject: [POWERPC] fsldma: Use compatiable binding as spec Documentation/powerpc/booting-without-of.txt specifies the compatiables we should bind to for this driver (elo, eloplus). Use these instead of the extremely specific 'mpc8540' and 'mpc8349' compatiables. Acked-by: Dan Williams Signed-off-by: Kumar Gala --- drivers/dma/fsldma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 72692309398..df163687c91 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -1021,11 +1021,11 @@ const u32 mpc8349_dma_ip_feature = FSL_DMA_IP_83XX | FSL_DMA_LITTLE_ENDIAN; static struct of_device_id of_fsl_dma_chan_ids[] = { { - .compatible = "fsl,mpc8540-dma-channel", + .compatible = "fsl,eloplus-dma-channel", .data = (void *)&mpc8540_dma_ip_feature, }, { - .compatible = "fsl,mpc8349-dma-channel", + .compatible = "fsl,elo-dma-channel", .data = (void *)&mpc8349_dma_ip_feature, }, {} @@ -1107,8 +1107,8 @@ err: } static struct of_device_id of_fsl_dma_ids[] = { - { .compatible = "fsl,mpc8540-dma", }, - { .compatible = "fsl,mpc8349-dma", }, + { .compatible = "fsl,eloplus-dma", }, + { .compatible = "fsl,elo-dma", }, {} }; -- cgit v1.2.3 From 0035a1dc8f56f2c92f4246b0c8b5f6d1ee10c76b Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Wed, 2 Apr 2008 10:02:06 -0400 Subject: Input: appletouch - add product IDs for the 4th generation MacBooks Signed-off-by: Tobias Mueller Acked-by: Johannes Berg Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/appletouch.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index b4423a471f0..8dd3942f302 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -62,6 +62,10 @@ #define GEYSER4_ISO_PRODUCT_ID 0x021B #define GEYSER4_JIS_PRODUCT_ID 0x021C +#define GEYSER4_HF_ANSI_PRODUCT_ID 0x0229 +#define GEYSER4_HF_ISO_PRODUCT_ID 0x022A +#define GEYSER4_HF_JIS_PRODUCT_ID 0x022B + #define ATP_DEVICE(prod) \ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ USB_DEVICE_ID_MATCH_INT_CLASS | \ @@ -93,6 +97,10 @@ static struct usb_device_id atp_table [] = { { ATP_DEVICE(GEYSER4_ISO_PRODUCT_ID) }, { ATP_DEVICE(GEYSER4_JIS_PRODUCT_ID) }, + { ATP_DEVICE(GEYSER4_HF_ANSI_PRODUCT_ID) }, + { ATP_DEVICE(GEYSER4_HF_ISO_PRODUCT_ID) }, + { ATP_DEVICE(GEYSER4_HF_JIS_PRODUCT_ID) }, + /* Terminating entry */ { } }; @@ -217,7 +225,10 @@ static inline int atp_is_geyser_3(struct atp *dev) (productId == GEYSER3_JIS_PRODUCT_ID) || (productId == GEYSER4_ANSI_PRODUCT_ID) || (productId == GEYSER4_ISO_PRODUCT_ID) || - (productId == GEYSER4_JIS_PRODUCT_ID); + (productId == GEYSER4_JIS_PRODUCT_ID) || + (productId == GEYSER4_HF_ANSI_PRODUCT_ID) || + (productId == GEYSER4_HF_ISO_PRODUCT_ID) || + (productId == GEYSER4_HF_JIS_PRODUCT_ID); } /* -- cgit v1.2.3 From 8d813941b17626a7610342325be63435282bac02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20B=C3=BCrgel?= Date: Thu, 3 Apr 2008 19:58:37 +1100 Subject: [POWERPC] Fix MPC5200 (not B!) device tree so FEC ethernet works MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This gets the FEC ethernet driver working again on the lite5200 platform. The FEC driver is also compatible with the MPC5200, not only with the MPC5200B, so this adds a suitable entry to the driver's match list. Furthermore this adds the settings for the PHY in the dts file for the Lite5200. Note, that this is not exactly the same as in the Lite5200B, because the PHY is located at f0003000:01 for the 5200, and at :00 for the 5200B. This was tested on a Lite5200 and a Lite5200B, both booted a kernel via tftp and mounted the root via nfs successfully. Signed-off-by: René Bürgel Acked-by: Grant Likely Signed-off-by: Paul Mackerras --- drivers/net/fec_mpc52xx.c | 1 + drivers/net/fec_mpc52xx_phy.c | 1 + 2 files changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 58b71e60204..fe59c27c09e 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c @@ -1057,6 +1057,7 @@ static int mpc52xx_fec_of_resume(struct of_device *op) #endif static struct of_device_id mpc52xx_fec_match[] = { + { .type = "network", .compatible = "fsl,mpc5200b-fec", }, { .type = "network", .compatible = "fsl,mpc5200-fec", }, { .type = "network", .compatible = "mpc5200-fec", }, { } diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c index 6a3ac4ea97e..1d0cd1dd955 100644 --- a/drivers/net/fec_mpc52xx_phy.c +++ b/drivers/net/fec_mpc52xx_phy.c @@ -179,6 +179,7 @@ static int mpc52xx_fec_mdio_remove(struct of_device *of) static struct of_device_id mpc52xx_fec_mdio_match[] = { { .compatible = "fsl,mpc5200b-mdio", }, + { .compatible = "fsl,mpc5200-mdio", }, { .compatible = "mpc5200b-fec-phy", }, {} }; -- cgit v1.2.3 From a4ba7fe2a6c2b61419b290035bff398ab2591c54 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 2 Apr 2008 10:35:15 +0900 Subject: libata: fix IDENTIFY order in ata_bus_probe() Commit f58229f8060055b08b34008ea08f31de1e2f003c accidentally made ata_bus_probe() not use reverse order probing. Fix it. There currently isn't any PATA driver which uses obsolete ata_bus_probe() path, so this patch is mainly for correctness. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 48519887f94..2db5c9c9ca1 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2660,7 +2660,7 @@ int ata_bus_probe(struct ata_port *ap) specific sequence bass-ackwards so that PDIAG- is released by the slave device */ - ata_link_for_each_dev(dev, &ap->link) { + ata_link_for_each_dev_reverse(dev, &ap->link) { if (tries[dev->devno]) dev->class = classes[dev->devno]; -- cgit v1.2.3 From 436d34b36202ef724778ded1e9cb10f8c37b32bc Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 2 Apr 2008 17:28:46 +0900 Subject: libata: uninline atapi_cmd_type() Uninline atapi_cmd_type(). It doesn't really have to be inline and more case will be added which need to access unexported libata variable. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/libata-core.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'drivers') diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 2db5c9c9ca1..e9b69ba489d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -325,6 +325,39 @@ static void ata_force_horkage(struct ata_device *dev) } } +/** + * atapi_cmd_type - Determine ATAPI command type from SCSI opcode + * @opcode: SCSI opcode + * + * Determine ATAPI command type from @opcode. + * + * LOCKING: + * None. + * + * RETURNS: + * ATAPI_{READ|WRITE|READ_CD|PASS_THRU|MISC} + */ +int atapi_cmd_type(u8 opcode) +{ + switch (opcode) { + case GPCMD_READ_10: + case GPCMD_READ_12: + return ATAPI_READ; + + case GPCMD_WRITE_10: + case GPCMD_WRITE_12: + case GPCMD_WRITE_AND_VERIFY_10: + return ATAPI_WRITE; + + case GPCMD_READ_CD: + case GPCMD_READ_CD_MSF: + return ATAPI_READ_CD; + + default: + return ATAPI_MISC; + } +} + /** * ata_tf_to_fis - Convert ATA taskfile to SATA FIS structure * @tf: Taskfile to convert @@ -7774,6 +7807,7 @@ EXPORT_SYMBOL_GPL(ata_tf_read); EXPORT_SYMBOL_GPL(ata_noop_dev_select); EXPORT_SYMBOL_GPL(ata_std_dev_select); EXPORT_SYMBOL_GPL(sata_print_link_status); +EXPORT_SYMBOL_GPL(atapi_cmd_type); EXPORT_SYMBOL_GPL(ata_tf_to_fis); EXPORT_SYMBOL_GPL(ata_tf_from_fis); EXPORT_SYMBOL_GPL(ata_pack_xfermask); -- cgit v1.2.3 From e52dcc4899cf1b7601379c31542bd91cd2997a64 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 2 Apr 2008 17:35:19 +0900 Subject: libata: ATA_12/16 doesn't fall into ATAPI_MISC SAT passthrus don't really fit into ATAPI_MISC class. SAT passthru commands always transfer multiple of 512 bytes and variable length response is not allowed. This patch creates a separate category - ATAPI_PASS_THRU - for these. This fixes HSM violation on "hdparm -I". Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/libata-core.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers') diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index e9b69ba489d..be95fdb6972 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -353,6 +353,11 @@ int atapi_cmd_type(u8 opcode) case GPCMD_READ_CD_MSF: return ATAPI_READ_CD; + case ATA_16: + case ATA_12: + if (atapi_passthru16) + return ATAPI_PASS_THRU; + /* fall thru */ default: return ATAPI_MISC; } -- cgit v1.2.3 From 8243e636c060fe7c10c9cf3bf53fdd2d48901525 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 3 Apr 2008 14:40:55 +0900 Subject: pata_ali: disable ATAPI DMA ATAPI DMA just doesn't work reliably on pata_ali. The IDE driver can do it but for some mysterious reason, pata_ali can't. This patch disables it by default and makes the driver whine during initialization. "pata_ali.atapi_dma" parameter is added so that user can bypass the workaround. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/pata_ali.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'drivers') diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 8786455c901..ce830fe3a36 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c @@ -36,6 +36,10 @@ #define DRV_NAME "pata_ali" #define DRV_VERSION "0.7.5" +int ali_atapi_dma = 0; +module_param_named(atapi_dma, ali_atapi_dma, int, 0644); +MODULE_PARM_DESC(atapi_dma, "Enable ATAPI DMA (0=disable, 1=enable)"); + /* * Cable special cases */ @@ -269,6 +273,27 @@ static void ali_set_dmamode(struct ata_port *ap, struct ata_device *adev) } } +/** + * ali_warn_atapi_dma - Warn about ATAPI DMA disablement + * @adev: Device + * + * Whine about ATAPI DMA disablement if @adev is an ATAPI device. + * Can be used as ->dev_config. + */ + +static void ali_warn_atapi_dma(struct ata_device *adev) +{ + struct ata_eh_context *ehc = &adev->link->eh_context; + int print_info = ehc->i.flags & ATA_EHI_PRINTINFO; + + if (print_info && adev->class == ATA_DEV_ATAPI && !ali_atapi_dma) { + ata_dev_printk(adev, KERN_WARNING, + "WARNING: ATAPI DMA disabled for reliablity issues. It can be enabled\n"); + ata_dev_printk(adev, KERN_WARNING, + "WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.\n"); + } +} + /** * ali_lock_sectors - Keep older devices to 255 sector mode * @adev: Device @@ -283,6 +308,7 @@ static void ali_set_dmamode(struct ata_port *ap, struct ata_device *adev) static void ali_lock_sectors(struct ata_device *adev) { adev->max_sectors = 255; + ali_warn_atapi_dma(adev); } /** @@ -294,6 +320,18 @@ static void ali_lock_sectors(struct ata_device *adev) static int ali_check_atapi_dma(struct ata_queued_cmd *qc) { + if (!ali_atapi_dma) { + /* FIXME: pata_ali can't do ATAPI DMA reliably but the + * IDE alim15x3 driver can. I tried lots of things + * but couldn't find what the actual difference was. + * If you got an idea, please write it to + * linux-ide@vger.kernel.org and cc htejun@gmail.com. + * + * Disable ATAPI DMA for now. + */ + return -EOPNOTSUPP; + } + /* If its not a media command, its not worth it */ if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC) return -EOPNOTSUPP; @@ -359,6 +397,7 @@ static struct ata_port_operations ali_20_port_ops = { .tf_load = ata_tf_load, .tf_read = ata_tf_read, + .check_atapi_dma = ali_check_atapi_dma, .check_status = ata_check_status, .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, @@ -438,6 +477,7 @@ static struct ata_port_operations ali_c5_port_ops = { .check_status = ata_check_status, .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .dev_config = ali_warn_atapi_dma, .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, -- cgit v1.2.3 From bbc60c18ed17df75270da504bbd8f7bc4a52d43d Mon Sep 17 00:00:00 2001 From: Michael Abd-El-Malek Date: Fri, 4 Apr 2008 02:33:48 -0700 Subject: xen: fix grant table bug fix memory corruption and crash due to mis-sized grant table. A PV OS has two grant table data structures: the grant table itself and a free list. The free list is composed of an array of pages, which grow dynamically as the guest OS requires more grants. While the grant table contains 8-byte entries, the free list contains 4-byte entries. So we have half as many pages in the free list than in the grant table. There was a bug in the free list allocation code. The free list was indexed as if it was the same size as the grant table. But it's only half as large. So memory got corrupted, and I was seeing crashes in the slab allocator later on. Taken from: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/4018c0da3360 Signed-off-by: Michael Abd-El-Malek Signed-off-by: Mark McLoughlin Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Ingo Molnar --- drivers/xen/grant-table.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index ea94dbabf9a..d85dc6d41c2 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -381,11 +381,15 @@ EXPORT_SYMBOL_GPL(gnttab_cancel_free_callback); static int grow_gnttab_list(unsigned int more_frames) { unsigned int new_nr_grant_frames, extra_entries, i; + unsigned int nr_glist_frames, new_nr_glist_frames; new_nr_grant_frames = nr_grant_frames + more_frames; extra_entries = more_frames * GREFS_PER_GRANT_FRAME; - for (i = nr_grant_frames; i < new_nr_grant_frames; i++) { + nr_glist_frames = (nr_grant_frames * GREFS_PER_GRANT_FRAME + RPP - 1) / RPP; + new_nr_glist_frames = + (new_nr_grant_frames * GREFS_PER_GRANT_FRAME + RPP - 1) / RPP; + for (i = nr_glist_frames; i < new_nr_glist_frames; i++) { gnttab_list[i] = (grant_ref_t *)__get_free_page(GFP_ATOMIC); if (!gnttab_list[i]) goto grow_nomem; @@ -407,7 +411,7 @@ static int grow_gnttab_list(unsigned int more_frames) return 0; grow_nomem: - for ( ; i >= nr_grant_frames; i--) + for ( ; i >= nr_glist_frames; i--) free_page((unsigned long) gnttab_list[i]); return -ENOMEM; } @@ -530,7 +534,7 @@ static int gnttab_expand(unsigned int req_entries) static int __devinit gnttab_init(void) { int i; - unsigned int max_nr_glist_frames; + unsigned int max_nr_glist_frames, nr_glist_frames; unsigned int nr_init_grefs; if (!is_running_on_xen()) @@ -543,15 +547,15 @@ static int __devinit gnttab_init(void) * grant reference free list on the current hypervisor. */ max_nr_glist_frames = (boot_max_nr_grant_frames * - GREFS_PER_GRANT_FRAME / - (PAGE_SIZE / sizeof(grant_ref_t))); + GREFS_PER_GRANT_FRAME / RPP); gnttab_list = kmalloc(max_nr_glist_frames * sizeof(grant_ref_t *), GFP_KERNEL); if (gnttab_list == NULL) return -ENOMEM; - for (i = 0; i < nr_grant_frames; i++) { + nr_glist_frames = (nr_grant_frames * GREFS_PER_GRANT_FRAME + RPP - 1) / RPP; + for (i = 0; i < nr_glist_frames; i++) { gnttab_list[i] = (grant_ref_t *)__get_free_page(GFP_KERNEL); if (gnttab_list[i] == NULL) goto ini_nomem; -- cgit v1.2.3 From 5761d64b277c287a7520b868c32d656ef03374b4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 4 Apr 2008 16:26:10 +0200 Subject: x86: revert assign IRQs to hpet timer The commits: commit 37a47db8d7f0f38dac5acf5a13abbc8f401707fa Author: Balaji Rao Date: Wed Jan 30 13:30:03 2008 +0100 x86: assign IRQs to HPET timers, fix and commit e3f37a54f690d3e64995ea7ecea08c5ab3070faf Author: Balaji Rao Date: Wed Jan 30 13:30:03 2008 +0100 x86: assign IRQs to HPET timers have been identified to cause a regression on some platforms due to the assignement of legacy IRQs which makes the legacy devices connected to those IRQs disfunctional. Revert them. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=10382 Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- drivers/char/hpet.c | 51 +++++++-------------------------------------------- 1 file changed, 7 insertions(+), 44 deletions(-) (limited to 'drivers') diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 465ad35ed38..1399971be68 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -731,14 +731,14 @@ static unsigned long hpet_calibrate(struct hpets *hpetp) int hpet_alloc(struct hpet_data *hdp) { - u64 cap, mcfg, hpet_config; + u64 cap, mcfg; struct hpet_dev *devp; - u32 i, ntimer, irq; + u32 i, ntimer; struct hpets *hpetp; size_t siz; struct hpet __iomem *hpet; static struct hpets *last = NULL; - unsigned long period, irq_bitmap; + unsigned long period; unsigned long long temp; /* @@ -765,47 +765,11 @@ int hpet_alloc(struct hpet_data *hdp) hpetp->hp_hpet_phys = hdp->hd_phys_address; hpetp->hp_ntimer = hdp->hd_nirqs; - hpet = hpetp->hp_hpet; - - /* Assign IRQs statically for legacy devices */ - hpetp->hp_dev[0].hd_hdwirq = hdp->hd_irq[0]; - hpetp->hp_dev[1].hd_hdwirq = hdp->hd_irq[1]; - - /* Assign IRQs dynamically for the others */ - for (i = 2, devp = &hpetp->hp_dev[2]; i < hdp->hd_nirqs; i++, devp++) { - struct hpet_timer __iomem *timer; - timer = &hpet->hpet_timers[devp - hpetp->hp_dev]; + for (i = 0; i < hdp->hd_nirqs; i++) + hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i]; - /* Check if there's already an IRQ assigned to the timer */ - if (hdp->hd_irq[i]) { - hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i]; - continue; - } - - hpet_config = readq(&timer->hpet_config); - irq_bitmap = (hpet_config & Tn_INT_ROUTE_CAP_MASK) - >> Tn_INT_ROUTE_CAP_SHIFT; - if (!irq_bitmap) - irq = 0; /* No valid IRQ Assignable */ - else { - irq = find_first_bit(&irq_bitmap, 32); - do { - hpet_config |= irq << Tn_INT_ROUTE_CNF_SHIFT; - writeq(hpet_config, &timer->hpet_config); - - /* - * Verify whether we have written a valid - * IRQ number by reading it back again - */ - hpet_config = readq(&timer->hpet_config); - if (irq == (hpet_config & Tn_INT_ROUTE_CNF_MASK) - >> Tn_INT_ROUTE_CNF_SHIFT) - break; /* Success */ - } while ((irq = (find_next_bit(&irq_bitmap, 32, irq)))); - } - hpetp->hp_dev[i].hd_hdwirq = irq; - } + hpet = hpetp->hp_hpet; cap = readq(&hpet->hpet_cap); @@ -836,8 +800,7 @@ int hpet_alloc(struct hpet_data *hdp) hpetp->hp_which, hdp->hd_phys_address, hpetp->hp_ntimer > 1 ? "s" : ""); for (i = 0; i < hpetp->hp_ntimer; i++) - printk("%s %d", i > 0 ? "," : "", - hpetp->hp_dev[i].hd_hdwirq); + printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]); printk("\n"); printk(KERN_INFO "hpet%u: %u %d-bit timers, %Lu Hz\n", -- cgit v1.2.3 From 4ed919014eb2b591eb8fdd4dd00226a65faddef4 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 4 Apr 2008 14:30:31 -0700 Subject: parport_pc: make sure to release IO ports after probing for IT87XX Commit f63fd7e299ee13da071ecfce2b90b58c5e1562b1 ("parport_pc: detection for SuperIO IT87XX POST") only released the IO port region on success, not when the probe for the IT87XX chip failed. That caused not only a reserved region to leak, but also caused an oops when the driver module was unloaded and somebody tried to cat /proc/ioports - because the string that was assigned to the IO port region was a static string in the module virtual address area. Reported-by: Lubos Lunak Cc: Jan Kara Cc: Petr Cvek Acked-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/parport/parport_pc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index d76d37bcb9c..a8580893820 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -1568,9 +1568,8 @@ static void __devinit detect_and_report_it87(void) outb(r | 8, 0x2F); outb(0x02, 0x2E); /* Lock */ outb(0x02, 0x2F); - - release_region(0x2e, 1); } + release_region(0x2e, 1); } #endif /* CONFIG_PARPORT_PC_SUPERIO */ -- cgit v1.2.3 From fb6d080c6f75dfd7e23d5a3575334785aa8738eb Mon Sep 17 00:00:00 2001 From: Alexey Korolev Date: Fri, 4 Apr 2008 14:30:01 -0700 Subject: mtd: fix broken state in CFI driver caused by FL_SHUTDOWN THe CFI driver in 2.6.24 kernel is broken. Not so intensive read/write operations cause incomplete writes which lead to kernel panics in JFFS2. We investigated the issue - it is caused by bug in FL_SHUTDOWN parsing code. Sometimes chip returns -EIO as if it is in FL_SHUTDOWN state when it should wait in FL_PONT (error in order of conditions). The following patch fixes the bug in state parsing code of CFI. Also I've added comments to notify developers if they want to add new case in future. Signed-off-by: Alexey Korolev Reviewed-by: Joern Engel Cc: David Woodhouse Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mtd/chips/cfi_cmdset_0001.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 47794d23a42..0080452531d 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -718,7 +718,7 @@ static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long /* Someone else might have been playing with it. */ return -EAGAIN; } - + /* Fall through */ case FL_READY: case FL_CFI_QUERY: case FL_JEDEC_QUERY: @@ -778,14 +778,14 @@ static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long chip->state = FL_READY; return 0; + case FL_SHUTDOWN: + /* The machine is rebooting now,so no one can get chip anymore */ + return -EIO; case FL_POINT: /* Only if there's no operation suspended... */ if (mode == FL_READY && chip->oldstate == FL_READY) return 0; - - case FL_SHUTDOWN: - /* The machine is rebooting now,so no one can get chip anymore */ - return -EIO; + /* Fall through */ default: sleep: set_current_state(TASK_UNINTERRUPTIBLE); -- cgit v1.2.3 From abd24df828f1a72971db29d1b74fefae104ea9e2 Mon Sep 17 00:00:00 2001 From: Carol Hebert Date: Fri, 4 Apr 2008 14:30:03 -0700 Subject: ipmi: change device node ordering to reflect probe order In 2.6.14 a patch was merged which switching the order of the ipmi device naming from in-order-of-discovery over to reverse-order-of-discovery. So on systems with multiple BMC interfaces, the ipmi device names are being created in reverse order relative to how they are discovered on the system (e.g. on an IBM x3950 multinode server with N nodes, the device name for the BMC in the first node is /dev/ipmiN-1 and the device name for the BMC in the last node is /dev/ipmi0, etc.). The problem is caused by the list handling routines chosen in dmi_scan.c. Using list_add() causes the multiple ipmi devices to be added to the device list using a stack-paradigm and so the ipmi driver subsequently pulls them off during initialization in LIFO order. This patch changes the dmi_save_ipmi_device() list handling paradigm to a queue, thereby allowing the ipmi driver to build the ipmi device names in the order in which they are found on the system. Signed-off-by: Carol Hebert Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/firmware/dmi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index 4072449ad1c..c5e3ed7e903 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c @@ -266,7 +266,7 @@ static void __init dmi_save_ipmi_device(const struct dmi_header *dm) dev->name = "IPMI controller"; dev->device_data = data; - list_add(&dev->list, &dmi_devices); + list_add_tail(&dev->list, &dmi_devices); } static void __init dmi_save_extended_devices(const struct dmi_header *dm) -- cgit v1.2.3 From 797de7bdb253624c16144f40b72ec65d63cdcca2 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 5 Apr 2008 12:14:13 -0700 Subject: Revert "ACPI: Ignore _BQC object when registering backlight device" This reverts commit 7c0ea45be4f114d85ee35caeead8e1660699c46f which caused a regression with the backlight being set to off when a laptop doesn't have a _BQC entry to query the actual backlight value. The code blindly then falls back on a value of 0. See http://bugzilla.kernel.org/show_bug.cgi?id=10387 http://lkml.org/lkml/2008/4/2/366 for details. Bisected-and-reported-by: Andrey Borzenkov Cc: Zhao Yakui Cc: Zhang Rui Cc: Len Brown Signed-off-by: Linus Torvalds --- drivers/acpi/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 12fb44f1676..980a7418878 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -713,7 +713,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) kfree(obj); - if (device->cap._BCL && device->cap._BCM && max_level > 0) { + if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){ int result; static int count = 0; char *name; -- cgit v1.2.3 From cc1020f15ad0f843c0111bf4b77bdfaabca79571 Mon Sep 17 00:00:00 2001 From: Andrew Paprocki Date: Wed, 2 Apr 2008 02:43:19 -0400 Subject: [WATCHDOG] it8712f_wdt Zero MSB timeout byte when disabling watchdog I noticed this while testing the latest code. I'm not sure if it is required, but the normal (or LSB) timeout value is set to zero, so the MSB should be as well to stay consistent. If the chip revision is >= 8, set MSB of the 16-bit timeout value to zero when disabling the watchdog in it8712f_wdt_disable(). Signed-off-by: Andrew Paprocki Signed-off-by: Wim Van Sebroeck Signed-off-by: Andrew Morton --- drivers/watchdog/it8712f_wdt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c index ca90c519259..445b7e81211 100644 --- a/drivers/watchdog/it8712f_wdt.c +++ b/drivers/watchdog/it8712f_wdt.c @@ -200,6 +200,8 @@ it8712f_wdt_disable(void) superio_outb(0, WDT_CONFIG); superio_outb(0, WDT_CONTROL); + if (revision >= 0x08) + superio_outb(0, WDT_TIMEOUT + 1); superio_outb(0, WDT_TIMEOUT); superio_exit(); -- cgit v1.2.3 From 4a8f3a5727c589a59bcaaca43dc1025b347b7a75 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Tue, 1 Apr 2008 16:48:23 -0300 Subject: V4L/DVB (7460): bttv: Bt832 - fix possible NULL pointer deref This patch does fix potential NULL pointer dereference Signed-off-by: Cyrill Gorcunov Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/bt8xx/bt832.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/video/bt8xx/bt832.c b/drivers/media/video/bt8xx/bt832.c index a5187613788..f92f06dec0d 100644 --- a/drivers/media/video/bt8xx/bt832.c +++ b/drivers/media/video/bt8xx/bt832.c @@ -97,6 +97,11 @@ int bt832_init(struct i2c_client *i2c_client_s) int rc; buf=kmalloc(65,GFP_KERNEL); + if (!buf) { + v4l_err(&t->client, + "Unable to allocate memory. Detaching.\n"); + return 0; + } bt832_hexdump(i2c_client_s,buf); if(buf[0x40] != 0x31) { @@ -211,7 +216,12 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg) switch (cmd) { case BT832_HEXDUMP: { unsigned char *buf; - buf=kmalloc(65,GFP_KERNEL); + buf = kmalloc(65, GFP_KERNEL); + if (!buf) { + v4l_err(&t->client, + "Unable to allocate memory\n"); + break; + } bt832_hexdump(&t->client,buf); kfree(buf); } -- cgit v1.2.3 From 8e08af3c30b4e5f59adff0baa33fd346227b45e2 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 2 Apr 2008 22:14:41 -0300 Subject: V4L/DVB (7495): s5h1409: fix blown-away bit in function s5h1409_set_gpio Preserve all other bits when setting gpio. Signed-off-by: Michael Krufky Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/s5h1409.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c index 819433485d3..1a4d8319773 100644 --- a/drivers/media/dvb/frontends/s5h1409.c +++ b/drivers/media/dvb/frontends/s5h1409.c @@ -445,7 +445,7 @@ static int s5h1409_set_gpio(struct dvb_frontend* fe, int enable) s5h1409_readreg(state, 0xe3) | 0x1100); else return s5h1409_writereg(state, 0xe3, - s5h1409_readreg(state, 0xe3) & 0xeeff); + s5h1409_readreg(state, 0xe3) & 0xfeff); } static int s5h1409_sleep(struct dvb_frontend* fe, int enable) -- cgit v1.2.3 From a80c5aa6da485da63def31442a19cdd6ff495ce6 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 3 Apr 2008 20:08:04 -0300 Subject: V4L/DVB (7499): v4l/dvb Kconfig: Fix bugzilla #10067 tda8290 breaks if tuner is selected, but CONFIG_DVB=n. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/media/Makefile b/drivers/media/Makefile index 8cf91353b56..7b8bb6949f5 100644 --- a/drivers/media/Makefile +++ b/drivers/media/Makefile @@ -6,3 +6,6 @@ obj-y := common/ obj-y += video/ obj-$(CONFIG_VIDEO_DEV) += radio/ obj-$(CONFIG_DVB_CORE) += dvb/ +ifeq ($(CONFIG_DVB_CORE),) + obj-$(CONFIG_VIDEO_TUNER) += dvb/frontends/ +endif -- cgit v1.2.3 From dd6e9467e0a7ddf02788f30adfe1cf2851c25fb8 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 8 Mar 2008 06:07:38 -0300 Subject: V4L/DVB (7496): pvrusb2: add new usb pid for 75xxx models Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/pvrusb2/pvrusb2-devattr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c index 4df6d6d936f..2b7b1fa0094 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c +++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c @@ -200,6 +200,8 @@ struct usb_device_id pvr2_device_table[] = { #endif { USB_DEVICE(0x2040, 0x7500), .driver_info = (kernel_ulong_t)&pvr2_device_75xxx}, + { USB_DEVICE(0x2040, 0x7501), + .driver_info = (kernel_ulong_t)&pvr2_device_75xxx}, { } }; -- cgit v1.2.3 From 92c9d07507f0a90b64172bfede7e6fa845e8e66b Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 15 Mar 2008 23:59:29 -0300 Subject: V4L/DVB (7497): pvrusb2: add new usb pid for 73xxx models Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/pvrusb2/pvrusb2-devattr.c | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'drivers') diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c index 2b7b1fa0094..98557ce950c 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c +++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c @@ -154,6 +154,37 @@ static const struct pvr2_device_desc pvr2_device_onair_usb2 = { +/*------------------------------------------------------------------------*/ +/* Hauppauge PVR-USB2 Model 73xxx */ + +static const char *pvr2_client_73xxx[] = { + "cx25840", + "tuner", +}; + +static const char *pvr2_fw1_names_73xxx[] = { + "v4l-pvrusb2-73xxx-01.fw", +}; + +static const struct pvr2_device_desc pvr2_device_73xxx = { + .description = "WinTV PVR USB2 Model Category 73xxxx", + .shortname = "73xxx", + .client_modules.lst = pvr2_client_73xxx, + .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx), + .fx2_firmware.lst = pvr2_fw1_names_73xxx, + .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx), + .flag_has_cx25840 = !0, + .flag_has_hauppauge_rom = !0, + .flag_has_analogtuner = !0, + .flag_has_composite = !0, + .flag_has_svideo = !0, + .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, + .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, + .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, +}; + + + /*------------------------------------------------------------------------*/ /* Hauppauge PVR-USB2 Model 75xxx */ @@ -198,6 +229,8 @@ struct usb_device_id pvr2_device_table[] = { { USB_DEVICE(0x11ba, 0x1001), .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2}, #endif + { USB_DEVICE(0x2040, 0x7300), + .driver_info = (kernel_ulong_t)&pvr2_device_73xxx}, { USB_DEVICE(0x2040, 0x7500), .driver_info = (kernel_ulong_t)&pvr2_device_75xxx}, { USB_DEVICE(0x2040, 0x7501), -- cgit v1.2.3 From 164fc5dcd6a1026fc713f5c63fad899aa484888c Mon Sep 17 00:00:00 2001 From: Hugh Dickins Date: Sun, 6 Apr 2008 23:56:57 +0100 Subject: scsi: fix sense_slab/bio swapping livelock Since 2.6.25-rc7, I've been seeing an occasional livelock on one x86_64 machine, copying kernel trees to tmpfs, paging out to swap. Signature: 6000 pages under writeback but never getting written; most tasks of interest trying to reclaim, but each get_swap_bio waiting for a bio in mempool_alloc's io_schedule_timeout(5*HZ); every five seconds an atomic page allocation failure report from kblockd failing to allocate a sense_buffer in __scsi_get_command. __scsi_get_command has a (one item) free_list to protect against this, but rc1's [SCSI] use dynamically allocated sense buffer de25deb18016f66dcdede165d07654559bb332bc upset that slightly. When it fails to allocate from the separate sense_slab, instead of giving up, it must fall back to the command free_list, which is sure to have a sense_buffer attached. Either my earlier -rc testing missed this, or there's some recent contributory factor. One very significant factor is SLUB, which merges slab caches when it can, and on 64-bit happens to merge both bio cache and sense_slab cache into kmalloc's 128-byte cache: so that under this swapping load, bios above are liable to gobble up all the slots needed for scsi_cmnd sense_buffers below. That's disturbing behaviour, and I tried a few things to fix it. Adding a no-op constructor to the sense_slab inhibits SLUB from merging it, and stops all the allocation failures I was seeing; but it's rather a hack, and perhaps in different configurations we have other caches on the swapout path which are ill-merged. Another alternative is to revert the separate sense_slab, using cache-line-aligned sense_buffer allocated beyond scsi_cmnd from the one kmem_cache; but that might waste more memory, and is only a way of diverting around the known problem. While I don't like seeing the allocation failures, and hate the idea of all those bios piled up above a scsi host working one by one, it does seem to emerge fairly soon with the livelock fix. So lacking better ideas, stick with that one clear fix for now. Signed-off-by: Hugh Dickins Cc: James Bottomley Cc: Andrew Morton Cc: FUJITA Tomonori Cc: Jens Axboe Cc: Christoph Lameter Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Rafael J. Wysocki Signed-off-by: Linus Torvalds --- drivers/scsi/scsi.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index e5c6f6af876..c78b836f59d 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -181,6 +181,18 @@ struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask) cmd = kmem_cache_alloc(shost->cmd_pool->cmd_slab, gfp_mask | shost->cmd_pool->gfp_mask); + if (likely(cmd)) { + buf = kmem_cache_alloc(shost->cmd_pool->sense_slab, + gfp_mask | shost->cmd_pool->gfp_mask); + if (likely(buf)) { + memset(cmd, 0, sizeof(*cmd)); + cmd->sense_buffer = buf; + } else { + kmem_cache_free(shost->cmd_pool->cmd_slab, cmd); + cmd = NULL; + } + } + if (unlikely(!cmd)) { unsigned long flags; @@ -197,16 +209,6 @@ struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask) memset(cmd, 0, sizeof(*cmd)); cmd->sense_buffer = buf; } - } else { - buf = kmem_cache_alloc(shost->cmd_pool->sense_slab, - gfp_mask | shost->cmd_pool->gfp_mask); - if (likely(buf)) { - memset(cmd, 0, sizeof(*cmd)); - cmd->sense_buffer = buf; - } else { - kmem_cache_free(shost->cmd_pool->cmd_slab, cmd); - cmd = NULL; - } } return cmd; -- cgit v1.2.3 From 3bf48468fe84468a148e4f19465e0a725c0f977b Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Sun, 6 Apr 2008 11:55:04 -0700 Subject: fix IS_I9XX macro in i915 DRM driver Now that we're mapping registers in the DRM driver at load time, the driver actually checks the PCI ID, so we need to make sure the macros have all the right bits (and longer term use the DRM headers as the sole copy of the PCI & register definitions). This patch adds 945GME support to the DRM headers, fixing a regression reported in http://bugzilla.kernel.org/show_bug.cgi?id=10395. Tested-by: Alexander Oltu Signed-off-by: Jesse Barnes Signed-off-by: Linus Torvalds --- drivers/char/drm/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index c10d128e34d..675d88bda06 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h @@ -1092,8 +1092,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); #define IS_I915G(dev) ((dev)->pci_device == 0x2582 || (dev)->pci_device == 0x258a) #define IS_I915GM(dev) ((dev)->pci_device == 0x2592) #define IS_I945G(dev) ((dev)->pci_device == 0x2772) -#define IS_I945GM(dev) ((dev)->pci_device == 0x27A2) - +#define IS_I945GM(dev) ((dev)->pci_device == 0x27A2 ||\ + (dev)->pci_device == 0x27AE) #define IS_I965G(dev) ((dev)->pci_device == 0x2972 || \ (dev)->pci_device == 0x2982 || \ (dev)->pci_device == 0x2992 || \ -- cgit v1.2.3 From 2557a933b795c1988c721ebb871cd735128bb9cb Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 7 Apr 2008 14:30:28 +1000 Subject: virtio: remove overzealous BUG_ON. The 'disable_cb' callback is designed as an optimization to tell the host we don't need callbacks now. As it is not reliable, the debug check is overzealous: it can happen on two CPUs at the same time. Document this. Even if it were reliable, the virtio_net driver doesn't disable callbacks on transmit so the START_USE/END_USE debugging reentrance protection can be easily tripped even on UP. Thanks to Balaji Rao for the bug report and testing. Signed-off-by: Rusty Russell CC: Balaji Rao Signed-off-by: Linus Torvalds --- drivers/virtio/virtio_ring.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers') diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index aa714028641..c2fa5c63081 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -214,10 +214,7 @@ static void vring_disable_cb(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); - START_USE(vq); - BUG_ON(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT); vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; - END_USE(vq); } static bool vring_enable_cb(struct virtqueue *_vq) -- cgit v1.2.3 From 099c736a470c8080a166e7a089f1e48e15f9947c Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 7 Apr 2008 13:20:08 -0700 Subject: Revert "smc91x: fix build breakage from the SMC_GET_MAC_ADDR API upgrade" This reverts commit 9e6db60825ef7e7999abc610ce256ba768e58162, which was merged without the API it needed, causing build breakage. Reported-by: Bryan Wu Acked-by: Jeff Garzik Signed-off-by: Linus Torvalds --- drivers/net/smc91x.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 98a832a7553..51d4134b37b 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -92,14 +92,14 @@ #define SMC_insw(a, r, p, l) insw ((unsigned long *)((a) + (r)), p, l) # endif /* check if the mac in reg is valid */ -#define SMC_GET_MAC_ADDR(lp, addr) \ +#define SMC_GET_MAC_ADDR(addr) \ do { \ unsigned int __v; \ - __v = SMC_inw(ioaddr, ADDR0_REG(lp)); \ + __v = SMC_inw(ioaddr, ADDR0_REG); \ addr[0] = __v; addr[1] = __v >> 8; \ - __v = SMC_inw(ioaddr, ADDR1_REG(lp)); \ + __v = SMC_inw(ioaddr, ADDR1_REG); \ addr[2] = __v; addr[3] = __v >> 8; \ - __v = SMC_inw(ioaddr, ADDR2_REG(lp)); \ + __v = SMC_inw(ioaddr, ADDR2_REG); \ addr[4] = __v; addr[5] = __v >> 8; \ if (*(u32 *)(&addr[0]) == 0xFFFFFFFF) { \ random_ether_addr(addr); \ -- cgit v1.2.3 From 6ea0a4679d6a11c66cfeb26d15244fb6f9b52d14 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Mon, 7 Apr 2008 15:33:16 -0500 Subject: virtio_net: remove overzealous printk The 'disable_cb' is really just a hint and as such, it's possible for more work to get queued up while callbacks are disabled. Under stress with an SMP guest, this printk triggers very frequently. There is no race here, this is how things are designed to work so let's just remove the printk. Signed-off-by: Anthony Liguori Acked-by: Rusty Russell Signed-off-by: Linus Torvalds --- drivers/net/virtio_net.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index b58472cf76f..d1a200ff5fd 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -284,7 +284,6 @@ again: /* Activate callback for using skbs: if this returns false it * means some were used in the meantime. */ if (unlikely(!vi->svq->vq_ops->enable_cb(vi->svq))) { - printk("Unlikely: restart svq race\n"); vi->svq->vq_ops->disable_cb(vi->svq); netif_start_queue(dev); goto again; -- cgit v1.2.3 From c976816b6e901341ec3c4653147316c15549a1c4 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Mon, 7 Apr 2008 23:30:10 +0200 Subject: siimage: fix kernel oops on PPC 44x Fix kernel oops due to machine check occuring in init_chipset_siimage() on PPC 44x platforms. These 32-bit CPUs have 36-bit physical address and PCI I/O and memory spaces are mapped beyond 4 GB; arch/ppc/ code has a fixup in ioremap() that creates an illusion of the PCI I/O and memory resources being mapped below 4 GB, while arch/powerpc/ code got rid of this fixup with PPC 44x having instead CONFIG_RESOURCES_64BIT=y -- this causes the resources to be truncated to 32-bit 'unsigned long' type in this driver, and so non-existant memory being ioremap'ed and then accessed... Thanks to Valentine Barshak for providing an initial patch and explanations. Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/pci/siimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index cc4be9621bc..8d624afe852 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c @@ -492,7 +492,7 @@ static void proc_reports_siimage (struct pci_dev *dev, u8 clocking, const char * static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name) { - unsigned long bar5 = pci_resource_start(dev, 5); + resource_size_t bar5 = pci_resource_start(dev, 5); unsigned long barsize = pci_resource_len(dev, 5); u8 tmpbyte = 0; void __iomem *ioaddr; -- cgit v1.2.3 From 4c3b01f71181a52ab7735a7c52b1aa2232826075 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 6 Apr 2008 20:40:17 -0400 Subject: pvrusb2: fix broken build due to patch order dependency Fix broken build due to patch order dependency. A future patch requires the lines that break the current build. Disable those lines for now. Signed-off-by: Michael Krufky Acked-by: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds --- drivers/media/video/pvrusb2/pvrusb2-devattr.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c index 98557ce950c..fe9991c10cf 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c +++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c @@ -175,12 +175,16 @@ static const struct pvr2_device_desc pvr2_device_73xxx = { .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx), .flag_has_cx25840 = !0, .flag_has_hauppauge_rom = !0, +#if 0 .flag_has_analogtuner = !0, .flag_has_composite = !0, .flag_has_svideo = !0, .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, +#else + .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, +#endif }; -- cgit v1.2.3 From ef45cb624b9517f71ad6c61299478c2cc08e4d98 Mon Sep 17 00:00:00 2001 From: Pete Zaitcev Date: Tue, 8 Apr 2008 17:41:51 -0700 Subject: ub: remove BUG() after __blk_end_request and fix the condition causing it When __blk_end_request returns nonzero, it means that the request was not completely processed and some BIOs are still attached. Since we have dequeued it by that time, it means leaking requests and hanging processes, which is why BUG() was in there. In ub this happens if a packet request ends normally, but with residue (e.g. when scsi_id issues INQUIRY). The fix is to make sure that arguments passed to __blk_end_request are correct: the full request length and not just transferred length. The transferred length is indicated to applications by adjusting rq->data_len with old, unchanged code outside of this patch. Signed-off-by: Pete Zaitcev Cc: Kiyoshi Ueda Cc: Greg KH Cc: Boaz Harrosh Cc: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/block/ub.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/block/ub.c b/drivers/block/ub.c index c452e2d355e..27bfe72aab5 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c @@ -8,6 +8,7 @@ * and is not licensed separately. See file COPYING for details. * * TODO (sorted by decreasing priority) + * -- Return sense now that rq allows it (we always auto-sense anyway). * -- set readonly flag for CDs, set removable flag for CF readers * -- do inquiry and verify we got a disk and not a tape (for LUN mismatch) * -- verify the 13 conditions and do bulk resets @@ -359,7 +360,8 @@ static void ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun, static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun, struct ub_scsi_cmd *cmd, struct ub_request *urq); static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd); -static void ub_end_rq(struct request *rq, unsigned int status); +static void ub_end_rq(struct request *rq, unsigned int status, + unsigned int cmd_len); static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, struct ub_request *urq, struct ub_scsi_cmd *cmd); static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd); @@ -642,13 +644,13 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) if (atomic_read(&sc->poison)) { blkdev_dequeue_request(rq); - ub_end_rq(rq, DID_NO_CONNECT << 16); + ub_end_rq(rq, DID_NO_CONNECT << 16, blk_rq_bytes(rq)); return 0; } if (lun->changed && !blk_pc_request(rq)) { blkdev_dequeue_request(rq); - ub_end_rq(rq, SAM_STAT_CHECK_CONDITION); + ub_end_rq(rq, SAM_STAT_CHECK_CONDITION, blk_rq_bytes(rq)); return 0; } @@ -701,7 +703,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) drop: ub_put_cmd(lun, cmd); - ub_end_rq(rq, DID_ERROR << 16); + ub_end_rq(rq, DID_ERROR << 16, blk_rq_bytes(rq)); return 0; } @@ -770,6 +772,7 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd) struct ub_request *urq = cmd->back; struct request *rq; unsigned int scsi_status; + unsigned int cmd_len; rq = urq->rq; @@ -779,8 +782,18 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd) rq->data_len = 0; else rq->data_len -= cmd->act_len; + scsi_status = 0; + } else { + if (cmd->act_len != cmd->len) { + if ((cmd->key == MEDIUM_ERROR || + cmd->key == UNIT_ATTENTION) && + ub_rw_cmd_retry(sc, lun, urq, cmd) == 0) + return; + scsi_status = SAM_STAT_CHECK_CONDITION; + } else { + scsi_status = 0; + } } - scsi_status = 0; } else { if (blk_pc_request(rq)) { /* UB_SENSE_SIZE is smaller than SCSI_SENSE_BUFFERSIZE */ @@ -801,14 +814,17 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd) urq->rq = NULL; + cmd_len = cmd->len; ub_put_cmd(lun, cmd); - ub_end_rq(rq, scsi_status); + ub_end_rq(rq, scsi_status, cmd_len); blk_start_queue(lun->disk->queue); } -static void ub_end_rq(struct request *rq, unsigned int scsi_status) +static void ub_end_rq(struct request *rq, unsigned int scsi_status, + unsigned int cmd_len) { int error; + long rqlen; if (scsi_status == 0) { error = 0; @@ -816,8 +832,12 @@ static void ub_end_rq(struct request *rq, unsigned int scsi_status) error = -EIO; rq->errors = scsi_status; } - if (__blk_end_request(rq, error, blk_rq_bytes(rq))) - BUG(); + rqlen = blk_rq_bytes(rq); /* Oddly enough, this is the residue. */ + if (__blk_end_request(rq, error, cmd_len)) { + printk(KERN_WARNING DRV_NAME + ": __blk_end_request blew, %s-cmd total %u rqlen %ld\n", + blk_pc_request(rq)? "pc": "fs", cmd_len, rqlen); + } } static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, -- cgit v1.2.3 From bb070e43497d4fcfea7d8b52003fe1376c218343 Mon Sep 17 00:00:00 2001 From: Krzysztof Helt Date: Tue, 8 Apr 2008 17:41:52 -0700 Subject: acpi thermal: fix result check thermal_zone_device_register() uses the ERR_PTR macro on its return values. A correct check is to use the IS_ERR() macro. The 2.6.25 kernels panic on Compaq AP550 without this patch as it has more then 10 (THERMAL_MAX_TRIPS) trip points (there are 12). Signed-off-by: Krzysztof Helt Cc: "Rafael J. Wysocki" Cc: Len Brown Acked-by: Zhang Rui Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/acpi/thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index c4e00ac8ea8..1bcecc7dd2c 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -1125,7 +1125,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) tz->trips.active[i].flags.valid; i++, trips++); tz->thermal_zone = thermal_zone_device_register("ACPI thermal zone", trips, tz, &acpi_thermal_zone_ops); - if (!tz->thermal_zone) + if (IS_ERR(tz->thermal_zone)) return -ENODEV; result = sysfs_create_link(&tz->device->dev.kobj, -- cgit v1.2.3 From ba62b077871a5255e271f4fdae57167651839277 Mon Sep 17 00:00:00 2001 From: Alok Kataria Date: Tue, 8 Apr 2008 17:41:56 -0700 Subject: acpi: fix "buggy BIOS check" when CPUs are hot removed Fixes a BUG in ACPI hotplugging. processor_device_array[pr->id] needs to be set to NULL when removing a CPU. Else the "buggy BIOS check" in acpi_processor_start mistakenly fires when a CPU is removed from the system and then later re-added. Signed-off-by: Alok N Kataria Signed-off-by: Dan Arai Cc: Len Brown Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/acpi/processor_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 36a68fa114e..a825b431b64 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -822,7 +822,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type) } processors[pr->id] = NULL; - + processor_device_array[pr->id] = NULL; kfree(pr); return 0; -- cgit v1.2.3 From 4fb98efacffd3dfbe8e3b9cb054dd71bab715065 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 8 Apr 2008 17:41:57 -0700 Subject: spi: spi_bfin5xx build fix Fix breakage cause by overzealous line wrapping; there should be only one format string. Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spi_bfin5xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index d853fceb6bf..c93c9d6d52e 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -713,8 +713,8 @@ static void pump_transfers(unsigned long data) } else { drv_data->len = transfer->len; } - dev_dbg(&drv_data->pdev->dev, "transfer: ", - "drv_data->write is %p, chip->write is %p, null_wr is %p\n", + dev_dbg(&drv_data->pdev->dev, + "transfer: drv_data->write is %p, chip->write is %p, null_wr is %p\n", drv_data->write, chip->write, null_writer); /* speed and width has been set on per message */ -- cgit v1.2.3 From f9e522caece074b9a985436d611127e8e96ad446 Mon Sep 17 00:00:00 2001 From: Vitja Makarov Date: Tue, 8 Apr 2008 17:41:57 -0700 Subject: spi: spi_bfin5xx: fix probe() sequencing Fix bug in SPI probe: first initialize peripheral pins, and just after register spi master device. This fixes problems with SPI drivers built-in kernel. Singed-off-by: Vitja Makarov Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spi_bfin5xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index c93c9d6d52e..a4bf3af7a15 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -1294,6 +1294,12 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev) goto out_error_queue_alloc; } + status = peripheral_request_list(drv_data->pin_req, DRV_NAME); + if (status != 0) { + dev_err(&pdev->dev, ": Requesting Peripherals failed\n"); + goto out_error_queue_alloc; + } + /* Register with the SPI framework */ platform_set_drvdata(pdev, drv_data); status = spi_register_master(master); @@ -1302,12 +1308,6 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev) goto out_error_queue_alloc; } - status = peripheral_request_list(drv_data->pin_req, DRV_NAME); - if (status != 0) { - dev_err(&pdev->dev, ": Requesting Peripherals failed\n"); - goto out_error; - } - dev_info(dev, "%s, Version %s, regs_base@%p, dma channel@%d\n", DRV_DESC, DRV_VERSION, drv_data->regs_base, drv_data->dma_channel); -- cgit v1.2.3 From b9ad8985f25c158e71844c78277a0c0b3779d0d3 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Tue, 8 Apr 2008 17:41:58 -0700 Subject: spi: spi_bfin5xx: remove unused label Remove unused label, and associated compiler warning. Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spi_bfin5xx.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers') diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index a4bf3af7a15..6635e15e5a7 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -1319,7 +1319,6 @@ out_error_no_dma_ch: iounmap((void *) drv_data->regs_base); out_error_ioremap: out_error_get_res: -out_error: spi_master_put(master); return status; -- cgit v1.2.3 From f8e30e447c692aaa728c65930ebc0146f65e1e7b Mon Sep 17 00:00:00 2001 From: Dmitry Adamushko Date: Tue, 8 Apr 2008 17:41:59 -0700 Subject: mtd/chips: add missing set_current_state() to cfi_{amdstd,staa}_sync() cfi_amdstd_sync() and cfi_staa_sync() call schedule() without changing task's state appropriately. In case of e.g. chip->state == FL_ERASING, cfi_*_sync() will be busy-looping either redundantly for a fixed interval of time (for SCHED_NORMAL tasks) or possibly endlessly (for RT tasks and UP). Signed-off-by: Dmitry Adamushko Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mtd/chips/cfi_cmdset_0002.c | 1 + drivers/mtd/chips/cfi_cmdset_0020.c | 1 + 2 files changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index d072e87ce4e..458d477614d 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -1763,6 +1763,7 @@ static void cfi_amdstd_sync (struct mtd_info *mtd) default: /* Not an idle state */ + set_current_state(TASK_UNINTERRUPTIBLE); add_wait_queue(&chip->wq, &wait); spin_unlock(chip->mutex); diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index b344ff858b2..492e2ab2742 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -1015,6 +1015,7 @@ static void cfi_staa_sync (struct mtd_info *mtd) default: /* Not an idle state */ + set_current_state(TASK_UNINTERRUPTIBLE); add_wait_queue(&chip->wq, &wait); spin_unlock_bh(chip->mutex); -- cgit v1.2.3 From 119b3aa65d33533c2f8d8822bb7a3e62aa12f860 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 9 Apr 2008 07:51:07 +1000 Subject: pata_sil680: Fix build on arch/ppc Commit 0f436eff54f90419ac1b8accfb3e6e17c4b49a4e breaks build on arch/ppc as it doesn't implement the machine_is() macro. This fixes it by using CONFIG_PPC_MERGE instead which represents arch/powerpc only, while CONFIG_PPC is set for both. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Jeff Garzik --- drivers/ata/pata_sil680.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 3988e44f493..7c5b2dd9a1a 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c @@ -270,7 +270,7 @@ static u8 sil680_init_chip(struct pci_dev *pdev, int *try_mmio) tmpbyte & 1, tmpbyte & 0x30); *try_mmio = 0; -#ifdef CONFIG_PPC +#ifdef CONFIG_PPC_MERGE if (machine_is(cell)) *try_mmio = (tmpbyte & 1) || pci_resource_start(pdev, 5); #endif -- cgit v1.2.3 From ac2c5bd05c88185ecbe7c114e472716f2e2d3a0c Mon Sep 17 00:00:00 2001 From: Johann Felix Soden Date: Sun, 6 Apr 2008 15:10:54 +0200 Subject: ata/sata_fsl: Remove unused variable in sata_fsl_probe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In sata_fsl_probe memory is allocated but never used or deallocated. Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10404 Thanks to Daniel Marjamäki for the bug report. Reported-by: Daniel Marjamäki Signed-off-by: Johann Felix Soden Signed-off-by: Jeff Garzik --- drivers/ata/sata_fsl.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers') diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 4c198551154..9d1e3cad4aa 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -1256,7 +1256,6 @@ static int sata_fsl_probe(struct of_device *ofdev, void __iomem *ssr_base = NULL; void __iomem *csr_base = NULL; struct sata_fsl_host_priv *host_priv = NULL; - struct resource *r; int irq; struct ata_host *host; @@ -1266,8 +1265,6 @@ static int sata_fsl_probe(struct of_device *ofdev, dev_printk(KERN_INFO, &ofdev->dev, "Sata FSL Platform/CSB Driver init\n"); - r = kmalloc(sizeof(struct resource), GFP_KERNEL); - hcr_base = of_iomap(ofdev->node, 0); if (!hcr_base) goto error_exit_with_cleanup; -- cgit v1.2.3 From 852fb2ac76241868454d07818ea0d87fcd9e5301 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Fri, 11 Apr 2008 12:07:04 +0200 Subject: i2c-ibm_iic: Fast mode parm desc fixup Noticed this when grepping for fast mode module params, the i2c-ibm_iic driver was using a non-existent variable for MODULE_PARM_DESC. Fix it up to reflect what it's actually supposed to be describing. Signed-off-by: Paul Mundt Signed-off-by: Jean Delvare --- drivers/i2c/busses/i2c-ibm_iic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 7c7eb0cfece..22bb247d0e6 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -55,7 +55,7 @@ MODULE_PARM_DESC(iic_force_poll, "Force polling mode"); static int iic_force_fast; module_param(iic_force_fast, bool, 0); -MODULE_PARM_DESC(iic_fast_poll, "Force fast mode (400 kHz)"); +MODULE_PARM_DESC(iic_force_fast, "Force fast mode (400 kHz)"); #define DBG_LEVEL 0 -- cgit v1.2.3 From b73a9aece56594bdb73712c8b9a8a4ad05fdeb33 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Fri, 11 Apr 2008 12:07:05 +0200 Subject: i2c-davinci: Fix lost interrupt DAVINCI_I2C_STR_REG is a write 1 to clear register, so don't use a read/modify/write cycle. Signed-off-by: Troy Kisky Acked-by: Dirk Behme Signed-off-by: Kevin Hilman Signed-off-by: Jean Delvare --- drivers/i2c/busses/i2c-davinci.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'drivers') diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index cce5a614758..fde26345a37 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -382,9 +382,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id) break; case DAVINCI_I2C_IVR_ARDY: - w = davinci_i2c_read_reg(dev, DAVINCI_I2C_STR_REG); - MOD_REG_BIT(w, DAVINCI_I2C_STR_ARDY, 1); - davinci_i2c_write_reg(dev, DAVINCI_I2C_STR_REG, w); + davinci_i2c_write_reg(dev, + DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_ARDY); complete(&dev->cmd_complete); break; @@ -397,12 +396,9 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id) if (dev->buf_len) continue; - w = davinci_i2c_read_reg(dev, - DAVINCI_I2C_STR_REG); - MOD_REG_BIT(w, DAVINCI_I2C_IMR_RRDY, 0); davinci_i2c_write_reg(dev, - DAVINCI_I2C_STR_REG, - w); + DAVINCI_I2C_STR_REG, + DAVINCI_I2C_IMR_RRDY); } else dev_err(dev->dev, "RDR IRQ while no " "data requested\n"); @@ -428,9 +424,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id) break; case DAVINCI_I2C_IVR_SCD: - w = davinci_i2c_read_reg(dev, DAVINCI_I2C_STR_REG); - MOD_REG_BIT(w, DAVINCI_I2C_STR_SCD, 1); - davinci_i2c_write_reg(dev, DAVINCI_I2C_STR_REG, w); + davinci_i2c_write_reg(dev, + DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_SCD); complete(&dev->cmd_complete); break; -- cgit v1.2.3 From fa16eefd3e835dd81c688a2a743eb59331162ed5 Mon Sep 17 00:00:00 2001 From: Till Harbaum Date: Fri, 11 Apr 2008 12:07:05 +0200 Subject: i2c-tiny-usb: New VID/PID pair I have recently bought some USB PIDs from EZPrototypes for my USB projects and one will be for the i2c-tiny-usb. I have not yet started to use the new one in the official i2c-tiny-usb firmware since i think it makes sense to get the change into the kernel before releasing a modified firmware. This patch adds support for the EZPrototypes USB vid/pid pair used in later i2c-tiny-usb firmware versions (avrusb v1.06 and up, usbtiny v2.06 and up). Signed-off-by: Till Harbaum Signed-off-by: Jean Delvare --- drivers/i2c/busses/i2c-tiny-usb.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c index cb9abe7565a..b1c050ff311 100644 --- a/drivers/i2c/busses/i2c-tiny-usb.c +++ b/drivers/i2c/busses/i2c-tiny-usb.c @@ -131,11 +131,15 @@ static const struct i2c_algorithm usb_algorithm = { /* ----- begin of usb layer ---------------------------------------------- */ -/* The usb i2c interface uses a vid/pid pair donated by */ -/* Future Technology Devices International Ltd. */ +/* + * Initially the usb i2c interface uses a vid/pid pair donated by + * Future Technology Devices International Ltd., later a pair was + * bought from EZPrototypes + */ static struct usb_device_id i2c_tiny_usb_table [] = { - { USB_DEVICE(0x0403, 0xc631) }, - { } /* Terminating entry */ + { USB_DEVICE(0x0403, 0xc631) }, /* FTDI */ + { USB_DEVICE(0x1c40, 0x0534) }, /* EZPrototypes */ + { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, i2c_tiny_usb_table); -- cgit v1.2.3 From d479540dbaba6f7acdb48e0242fee868c7a68116 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 10 Apr 2008 21:29:18 -0700 Subject: rtc: rtc-s35390a.c needs the bitreverse library rtc-s35390a uses BITREVERSE functions so it needs to select that config symbol to ensure that the functions are built. drivers/built-in.o: In function `s35390a_set_datetime': linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:144: undefined reference to `byte_rev_table' drivers/built-in.o: In function `s35390a_get_datetime': linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:163: undefined reference to `byte_rev_table' Signed-off-by: Randy Dunlap Acked-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 9e7de63b26e..02a4c8cf2b2 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -252,6 +252,7 @@ config RTC_DRV_TWL92330 config RTC_DRV_S35390A tristate "Seiko Instruments S-35390A" + select BITREVERSE help If you say yes here you will get support for the Seiko Instruments S-35390A. -- cgit v1.2.3 From 7e38c3c4453bdb5ffdf8bf0ff0d9a760540f0893 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 10 Apr 2008 21:29:20 -0700 Subject: spi: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable SPI platform drivers, to allow module auto loading. [dbrownell@users.sourceforge.net: more drivers: registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/atmel_spi.c | 1 + drivers/spi/au1550_spi.c | 3 +++ drivers/spi/mpc52xx_psc_spi.c | 3 +++ drivers/spi/omap2_mcspi.c | 3 +++ drivers/spi/omap_uwire.c | 4 +++- drivers/spi/pxa2xx_spi.c | 2 +- drivers/spi/spi_bfin5xx.c | 2 +- drivers/spi/spi_imx.c | 4 +++- drivers/spi/spi_mpc83xx.c | 5 +++-- drivers/spi/spi_s3c24xx.c | 2 +- drivers/spi/spi_s3c24xx_gpio.c | 2 ++ drivers/spi/spi_sh_sci.c | 1 + drivers/spi/spi_txx9.c | 3 +++ drivers/spi/xilinx_spi.c | 3 +++ 14 files changed, 31 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 85687aaf9ca..1749a27be06 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -863,3 +863,4 @@ module_exit(atmel_spi_exit); MODULE_DESCRIPTION("Atmel AT32/AT91 SPI Controller driver"); MODULE_AUTHOR("Haavard Skinnemoen "); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:atmel_spi"); diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index 41a3d00c451..072c4a59533 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c @@ -958,6 +958,9 @@ static int __exit au1550_spi_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:au1550-spi"); + static struct platform_driver au1550_spi_drv = { .remove = __exit_p(au1550_spi_remove), .driver = { diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c index a86315a0c5b..90729469d48 100644 --- a/drivers/spi/mpc52xx_psc_spi.c +++ b/drivers/spi/mpc52xx_psc_spi.c @@ -500,6 +500,9 @@ static int __exit mpc52xx_psc_spi_remove(struct platform_device *dev) return mpc52xx_psc_spi_do_remove(&dev->dev); } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:mpc52xx-psc-spi"); + static struct platform_driver mpc52xx_psc_spi_platform_driver = { .remove = __exit_p(mpc52xx_psc_spi_remove), .driver = { diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index a6ba11afb03..b1cc148036c 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c @@ -1084,6 +1084,9 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:omap2_mcspi"); + static struct platform_driver omap2_mcspi_driver = { .driver = { .name = "omap2_mcspi", diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c index 8245b5153f3..5f00bd6500e 100644 --- a/drivers/spi/omap_uwire.c +++ b/drivers/spi/omap_uwire.c @@ -537,10 +537,12 @@ static int __exit uwire_remove(struct platform_device *pdev) return status; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:omap_uwire"); + static struct platform_driver uwire_driver = { .driver = { .name = "omap_uwire", - .bus = &platform_bus_type, .owner = THIS_MODULE, }, .remove = __exit_p(uwire_remove), diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index 59deed79e0a..147e26a78d6 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c @@ -44,6 +44,7 @@ MODULE_AUTHOR("Stephen Street"); MODULE_DESCRIPTION("PXA2xx SSP SPI Controller"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:pxa2xx-spi"); #define MAX_BUSES 3 @@ -1581,7 +1582,6 @@ static int pxa2xx_spi_resume(struct platform_device *pdev) static struct platform_driver driver = { .driver = { .name = "pxa2xx-spi", - .bus = &platform_bus_type, .owner = THIS_MODULE, }, .remove = pxa2xx_spi_remove, diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 6635e15e5a7..a9ac1fdb309 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -1396,7 +1396,7 @@ static int bfin5xx_spi_resume(struct platform_device *pdev) #define bfin5xx_spi_resume NULL #endif /* CONFIG_PM */ -MODULE_ALIAS("bfin-spi-master"); /* for platform bus hotplug */ +MODULE_ALIAS("platform:bfin-spi"); static struct platform_driver bfin5xx_spi_driver = { .driver = { .name = DRV_NAME, diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 1b064712493..d4ba640366b 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -1722,10 +1722,12 @@ static int spi_imx_resume(struct platform_device *pdev) #define spi_imx_resume NULL #endif /* CONFIG_PM */ +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:spi_imx"); + static struct platform_driver driver = { .driver = { .name = "spi_imx", - .bus = &platform_bus_type, .owner = THIS_MODULE, }, .remove = __exit_p(spi_imx_remove), diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index 04f7cd9fc26..be15a621320 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c @@ -523,11 +523,12 @@ static int __exit mpc83xx_spi_remove(struct platform_device *dev) return 0; } -MODULE_ALIAS("mpc83xx_spi"); /* for platform bus hotplug */ +MODULE_ALIAS("platform:mpc83xx_spi"); static struct platform_driver mpc83xx_spi_driver = { .remove = __exit_p(mpc83xx_spi_remove), .driver = { - .name = "mpc83xx_spi", + .name = "mpc83xx_spi", + .owner = THIS_MODULE, }, }; diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 6e834b8b9d2..e75103aac79 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c @@ -415,7 +415,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev) #define s3c24xx_spi_resume NULL #endif -MODULE_ALIAS("s3c2410_spi"); /* for platform bus hotplug */ +MODULE_ALIAS("platform:s3c2410-spi"); static struct platform_driver s3c24xx_spidrv = { .remove = __exit_p(s3c24xx_spi_remove), .suspend = s3c24xx_spi_suspend, diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c index 82ae7d7eca3..e33f6145c56 100644 --- a/drivers/spi/spi_s3c24xx_gpio.c +++ b/drivers/spi/spi_s3c24xx_gpio.c @@ -168,6 +168,8 @@ static int s3c2410_spigpio_remove(struct platform_device *dev) #define s3c2410_spigpio_suspend NULL #define s3c2410_spigpio_resume NULL +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:spi_s3c24xx_gpio"); static struct platform_driver s3c2410_spigpio_drv = { .probe = s3c2410_spigpio_probe, diff --git a/drivers/spi/spi_sh_sci.c b/drivers/spi/spi_sh_sci.c index 3dbe71b16d6..7d36720eb98 100644 --- a/drivers/spi/spi_sh_sci.c +++ b/drivers/spi/spi_sh_sci.c @@ -203,3 +203,4 @@ module_exit(sh_sci_spi_exit); MODULE_DESCRIPTION("SH SCI SPI Driver"); MODULE_AUTHOR("Magnus Damm "); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:spi_sh_sci"); diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c index 363ac8e6882..2296f37ea3c 100644 --- a/drivers/spi/spi_txx9.c +++ b/drivers/spi/spi_txx9.c @@ -450,6 +450,9 @@ static int __exit txx9spi_remove(struct platform_device *dev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:spi_txx9"); + static struct platform_driver txx9spi_driver = { .remove = __exit_p(txx9spi_remove), .driver = { diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c index 5d04f520c12..cf6aef34fe2 100644 --- a/drivers/spi/xilinx_spi.c +++ b/drivers/spi/xilinx_spi.c @@ -408,6 +408,9 @@ static int __devexit xilinx_spi_remove(struct platform_device *dev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:" XILINX_SPI_NAME); + static struct platform_driver xilinx_spi_driver = { .probe = xilinx_spi_probe, .remove = __devexit_p(xilinx_spi_remove), -- cgit v1.2.3 From f34c32f13ce8c539f3f582562358e39a86b00e83 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 10 Apr 2008 21:29:21 -0700 Subject: usb gadget: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable usb peripheral drivers, to re-eable module auto loading. [dbrownell@users.sourceforge.net: registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/usb/gadget/at91_udc.c | 1 + drivers/usb/gadget/atmel_usba_udc.c | 2 ++ drivers/usb/gadget/fsl_usb2_udc.c | 1 + drivers/usb/gadget/lh7a40x_udc.c | 1 + drivers/usb/gadget/m66592-udc.c | 2 ++ drivers/usb/gadget/omap_udc.c | 2 +- drivers/usb/gadget/pxa2xx_udc.c | 2 +- drivers/usb/gadget/s3c2410_udc.c | 2 ++ 8 files changed, 11 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index a83e8b798ec..fd15ced899d 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1884,3 +1884,4 @@ module_exit(udc_exit_module); MODULE_DESCRIPTION("AT91 udc driver"); MODULE_AUTHOR("Thomas Rathbone, David Brownell"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:at91_udc"); diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index af8b2a3a2d4..b0db4c31d01 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -2054,6 +2054,7 @@ static struct platform_driver udc_driver = { .remove = __exit_p(usba_udc_remove), .driver = { .name = "atmel_usba_udc", + .owner = THIS_MODULE, }, }; @@ -2072,3 +2073,4 @@ module_exit(udc_exit); MODULE_DESCRIPTION("Atmel USBA UDC driver"); MODULE_AUTHOR("Haavard Skinnemoen "); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:atmel_usba_udc"); diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index 63e8fa3a69e..254012ad2b9 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c @@ -2475,3 +2475,4 @@ module_exit(udc_exit); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:fsl-usb2-udc"); diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index 37243ef7104..078f7246767 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c @@ -2146,3 +2146,4 @@ module_exit(udc_exit); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("Mikko Lahteenmaki, Bo Henriksen"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:lh7a40x_udc"); diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index 835948f0715..ee6b35fa870 100644 --- a/drivers/usb/gadget/m66592-udc.c +++ b/drivers/usb/gadget/m66592-udc.c @@ -35,6 +35,7 @@ MODULE_DESCRIPTION("M66592 USB gadget driver"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Yoshihiro Shimoda"); +MODULE_ALIAS("platform:m66592_udc"); #define DRIVER_VERSION "18 Oct 2007" @@ -1671,6 +1672,7 @@ static struct platform_driver m66592_driver = { .remove = __exit_p(m66592_remove), .driver = { .name = (char *) udc_name, + .owner = THIS_MODULE, }, }; diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index e6d68bda428..ee1e9a314cd 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c @@ -3109,4 +3109,4 @@ module_exit(udc_exit); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); - +MODULE_ALIAS("platform:omap_udc"); diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index 096c41cc40d..c00cd8b9d3d 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c @@ -2380,4 +2380,4 @@ module_exit(udc_exit); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); MODULE_LICENSE("GPL"); - +MODULE_ALIAS("platform:pxa2xx-udc"); diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index aadc4204d6f..6b1ef488043 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -2047,3 +2047,5 @@ MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:s3c2410-usbgadget"); +MODULE_ALIAS("platform:s3c2440-usbgadget"); -- cgit v1.2.3 From f4fce61d410b96ae263b001c45f73df1863dad8d Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 10 Apr 2008 21:29:22 -0700 Subject: usb host: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable USB HCDs, to allow re-enable auto loading. [dbrownell@users.sourceforge.net: more drivers; registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/usb/host/isp116x-hcd.c | 8 ++++++-- drivers/usb/host/ohci-at91.c | 3 +-- drivers/usb/host/ohci-au1xxx.c | 1 + drivers/usb/host/ohci-ep93xx.c | 2 ++ drivers/usb/host/ohci-lh7a404.c | 1 + drivers/usb/host/ohci-omap.c | 1 + drivers/usb/host/ohci-pnx4008.c | 4 ++++ drivers/usb/host/ohci-pnx8550.c | 5 +++-- drivers/usb/host/ohci-ppc-soc.c | 1 + drivers/usb/host/ohci-pxa27x.c | 3 +++ drivers/usb/host/ohci-s3c2410.c | 1 + drivers/usb/host/ohci-sh.c | 1 + drivers/usb/host/ohci-sm501.c | 1 + drivers/usb/host/r8a66597-hcd.c | 2 ++ drivers/usb/host/sl811-hcd.c | 1 + drivers/usb/host/u132-hcd.c | 1 + 16 files changed, 30 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index d7071c85575..203a3359a64 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c @@ -1684,14 +1684,18 @@ static int isp116x_resume(struct platform_device *dev) #endif +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:isp116x-hcd"); + static struct platform_driver isp116x_driver = { .probe = isp116x_probe, .remove = isp116x_remove, .suspend = isp116x_suspend, .resume = isp116x_resume, .driver = { - .name = (char *)hcd_name, - }, + .name = (char *)hcd_name, + .owner = THIS_MODULE, + }, }; /*-----------------------------------------------------------------*/ diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 126fcbdd640..d72dc07dda0 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -355,7 +355,7 @@ static int ohci_hcd_at91_drv_resume(struct platform_device *pdev) #define ohci_hcd_at91_drv_resume NULL #endif -MODULE_ALIAS("at91_ohci"); +MODULE_ALIAS("platform:at91_ohci"); static struct platform_driver ohci_hcd_at91_driver = { .probe = ohci_hcd_at91_drv_probe, @@ -368,4 +368,3 @@ static struct platform_driver ohci_hcd_at91_driver = { .owner = THIS_MODULE, }, }; - diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c index 663a0600b6e..f90fe0c7373 100644 --- a/drivers/usb/host/ohci-au1xxx.c +++ b/drivers/usb/host/ohci-au1xxx.c @@ -345,3 +345,4 @@ static struct platform_driver ohci_hcd_au1xxx_driver = { }, }; +MODULE_ALIAS("platform:au1xxx-ohci"); diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c index a68ce9d3c52..156e93a9d0d 100644 --- a/drivers/usb/host/ohci-ep93xx.c +++ b/drivers/usb/host/ohci-ep93xx.c @@ -211,6 +211,8 @@ static struct platform_driver ohci_hcd_ep93xx_driver = { #endif .driver = { .name = "ep93xx-ohci", + .owner = THIS_MODULE, }, }; +MODULE_ALIAS("platform:ep93xx-ohci"); diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c index 4a043abd85e..13c12ed2225 100644 --- a/drivers/usb/host/ohci-lh7a404.c +++ b/drivers/usb/host/ohci-lh7a404.c @@ -251,3 +251,4 @@ static struct platform_driver ohci_hcd_lh7a404_driver = { }, }; +MODULE_ALIAS("platform:lh7a404-ohci"); diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 74e1f4be10b..7bfca1ed1b5 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c @@ -544,3 +544,4 @@ static struct platform_driver ohci_hcd_omap_driver = { }, }; +MODULE_ALIAS("platform:ohci"); diff --git a/drivers/usb/host/ohci-pnx4008.c b/drivers/usb/host/ohci-pnx4008.c index 6c52c66b659..28b458f20cc 100644 --- a/drivers/usb/host/ohci-pnx4008.c +++ b/drivers/usb/host/ohci-pnx4008.c @@ -456,9 +456,13 @@ static int usb_hcd_pnx4008_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:usb-ohci"); + static struct platform_driver usb_hcd_pnx4008_driver = { .driver = { .name = "usb-ohci", + .owner = THIS_MODULE, }, .probe = usb_hcd_pnx4008_probe, .remove = usb_hcd_pnx4008_remove, diff --git a/drivers/usb/host/ohci-pnx8550.c b/drivers/usb/host/ohci-pnx8550.c index 85fdfd2a7ad..605d59cba28 100644 --- a/drivers/usb/host/ohci-pnx8550.c +++ b/drivers/usb/host/ohci-pnx8550.c @@ -230,11 +230,12 @@ static int ohci_hcd_pnx8550_drv_remove(struct platform_device *pdev) return 0; } -MODULE_ALIAS("pnx8550-ohci"); +MODULE_ALIAS("platform:pnx8550-ohci"); static struct platform_driver ohci_hcd_pnx8550_driver = { .driver = { - .name = "pnx8550-ohci", + .name = "pnx8550-ohci", + .owner = THIS_MODULE, }, .probe = ohci_hcd_pnx8550_drv_probe, .remove = ohci_hcd_pnx8550_drv_remove, diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c index f95be1896b0..523c3012557 100644 --- a/drivers/usb/host/ohci-ppc-soc.c +++ b/drivers/usb/host/ohci-ppc-soc.c @@ -213,3 +213,4 @@ static struct platform_driver ohci_hcd_ppc_soc_driver = { }, }; +MODULE_ALIAS("platform:ppc-soc-ohci"); diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index ff9a7984347..8ad9b3b604b 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -364,6 +364,8 @@ static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev) } #endif +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:pxa27x-ohci"); static struct platform_driver ohci_hcd_pxa27x_driver = { .probe = ohci_hcd_pxa27x_drv_probe, @@ -375,6 +377,7 @@ static struct platform_driver ohci_hcd_pxa27x_driver = { #endif .driver = { .name = "pxa27x-ohci", + .owner = THIS_MODULE, }, }; diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index 44b79e8a6e2..ead4772f0f2 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c @@ -501,3 +501,4 @@ static struct platform_driver ohci_hcd_s3c2410_driver = { }, }; +MODULE_ALIAS("platform:s3c2410-ohci"); diff --git a/drivers/usb/host/ohci-sh.c b/drivers/usb/host/ohci-sh.c index 5309ac039e1..e7ee607278f 100644 --- a/drivers/usb/host/ohci-sh.c +++ b/drivers/usb/host/ohci-sh.c @@ -141,3 +141,4 @@ static struct platform_driver ohci_hcd_sh_driver = { }, }; +MODULE_ALIAS("platform:sh_ohci"); diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c index a9707014286..4ea92762fb2 100644 --- a/drivers/usb/host/ohci-sm501.c +++ b/drivers/usb/host/ohci-sm501.c @@ -262,3 +262,4 @@ static struct platform_driver ohci_hcd_sm501_driver = { .name = "sm501-usb", }, }; +MODULE_ALIAS("platform:sm501-usb"); diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 0ce2fc5e396..9f80e528557 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -44,6 +44,7 @@ MODULE_DESCRIPTION("R8A66597 USB Host Controller Driver"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Yoshihiro Shimoda"); +MODULE_ALIAS("platform:r8a66597_hcd"); #define DRIVER_VERSION "29 May 2007" @@ -2219,6 +2220,7 @@ static struct platform_driver r8a66597_driver = { .resume = r8a66597_resume, .driver = { .name = (char *) hcd_name, + .owner = THIS_MODULE, }, }; diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 59be276ccd9..629bca0ebe8 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c @@ -58,6 +58,7 @@ MODULE_DESCRIPTION("SL811HS USB Host Controller Driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:sl811-hcd"); #define DRIVER_VERSION "19 May 2005" diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c index 3033d694520..8e117a795e9 100644 --- a/drivers/usb/host/u132-hcd.c +++ b/drivers/usb/host/u132-hcd.c @@ -3316,3 +3316,4 @@ static void __exit u132_hcd_exit(void) module_exit(u132_hcd_exit); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:u132_hcd"); -- cgit v1.2.3 From f37d193c7c150c40059c7ce5de34e8b28a9cd4ae Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 10 Apr 2008 21:29:23 -0700 Subject: watchdog: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable watchdog drivers, to re-enable auto loading. [dbrownell@users.sourceforge.net: more drivers; registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Cc: Wim Van Sebroeck Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/watchdog/at32ap700x_wdt.c | 3 +++ drivers/watchdog/at91rm9200_wdt.c | 1 + drivers/watchdog/davinci_wdt.c | 2 ++ drivers/watchdog/ks8695_wdt.c | 1 + drivers/watchdog/mpc83xx_wdt.c | 2 ++ drivers/watchdog/mpcore_wdt.c | 3 +++ drivers/watchdog/mtx-1_wdt.c | 2 ++ drivers/watchdog/mv64x60_wdt.c | 1 + drivers/watchdog/omap_wdt.c | 1 + drivers/watchdog/pnx4008_wdt.c | 2 ++ drivers/watchdog/s3c2410_wdt.c | 1 + drivers/watchdog/txx9wdt.c | 1 + 12 files changed, 20 insertions(+) (limited to 'drivers') diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c index fb5ed6478f7..ae0fca5e874 100644 --- a/drivers/watchdog/at32ap700x_wdt.c +++ b/drivers/watchdog/at32ap700x_wdt.c @@ -418,6 +418,9 @@ static int at32_wdt_resume(struct platform_device *pdev) #define at32_wdt_resume NULL #endif +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:at32_wdt"); + static struct platform_driver at32_wdt_driver = { .remove = __exit_p(at32_wdt_remove), .suspend = at32_wdt_suspend, diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c index a684b1e8737..9ff9a956532 100644 --- a/drivers/watchdog/at91rm9200_wdt.c +++ b/drivers/watchdog/at91rm9200_wdt.c @@ -286,3 +286,4 @@ MODULE_AUTHOR("Andrew Victor"); MODULE_DESCRIPTION("Watchdog driver for Atmel AT91RM9200"); MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:at91_wdt"); diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index a61cbd48dc0..1782c79eff0 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c @@ -248,6 +248,7 @@ static int davinci_wdt_remove(struct platform_device *pdev) static struct platform_driver platform_wdt_driver = { .driver = { .name = "watchdog", + .owner = THIS_MODULE, }, .probe = davinci_wdt_probe, .remove = davinci_wdt_remove, @@ -277,3 +278,4 @@ MODULE_PARM_DESC(heartbeat, MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:watchdog"); diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c index e3a29c30230..df5a6b811cc 100644 --- a/drivers/watchdog/ks8695_wdt.c +++ b/drivers/watchdog/ks8695_wdt.c @@ -306,3 +306,4 @@ MODULE_AUTHOR("Andrew Victor"); MODULE_DESCRIPTION("Watchdog driver for KS8695"); MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:ks8695_wdt"); diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c index 6369f569517..b16c5cd972e 100644 --- a/drivers/watchdog/mpc83xx_wdt.c +++ b/drivers/watchdog/mpc83xx_wdt.c @@ -206,6 +206,7 @@ static struct platform_driver mpc83xx_wdt_driver = { .remove = __devexit_p(mpc83xx_wdt_remove), .driver = { .name = "mpc83xx_wdt", + .owner = THIS_MODULE, }, }; @@ -226,3 +227,4 @@ MODULE_AUTHOR("Dave Updegraff, Kumar Gala"); MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx uProcessor"); MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:mpc83xx_wdt"); diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c index 0d2b2773541..009573b8149 100644 --- a/drivers/watchdog/mpcore_wdt.c +++ b/drivers/watchdog/mpcore_wdt.c @@ -392,6 +392,9 @@ static int __devexit mpcore_wdt_remove(struct platform_device *dev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:mpcore_wdt"); + static struct platform_driver mpcore_wdt_driver = { .probe = mpcore_wdt_probe, .remove = __devexit_p(mpcore_wdt_remove), diff --git a/drivers/watchdog/mtx-1_wdt.c b/drivers/watchdog/mtx-1_wdt.c index 10b89f2703b..a8e67383784 100644 --- a/drivers/watchdog/mtx-1_wdt.c +++ b/drivers/watchdog/mtx-1_wdt.c @@ -243,6 +243,7 @@ static struct platform_driver mtx1_wdt = { .probe = mtx1_wdt_probe, .remove = mtx1_wdt_remove, .driver.name = "mtx1-wdt", + .driver.owner = THIS_MODULE, }; static int __init mtx1_wdt_init(void) @@ -262,3 +263,4 @@ MODULE_AUTHOR("Michael Stickel, Florian Fainelli"); MODULE_DESCRIPTION("Driver for the MTX-1 watchdog"); MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:mtx1-wdt"); diff --git a/drivers/watchdog/mv64x60_wdt.c b/drivers/watchdog/mv64x60_wdt.c index 0365c317f7e..b59ca327396 100644 --- a/drivers/watchdog/mv64x60_wdt.c +++ b/drivers/watchdog/mv64x60_wdt.c @@ -324,3 +324,4 @@ MODULE_AUTHOR("James Chapman "); MODULE_DESCRIPTION("MV64x60 watchdog driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:" MV64x60_WDT_NAME); diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 635ca454f56..74bc39aa1ce 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -387,3 +387,4 @@ module_exit(omap_wdt_exit); MODULE_AUTHOR("George G. Davis"); MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:omap_wdt"); diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index b04aa096a10..6b8483d3c78 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c @@ -321,6 +321,7 @@ static int pnx4008_wdt_remove(struct platform_device *pdev) static struct platform_driver platform_wdt_driver = { .driver = { .name = "watchdog", + .owner = THIS_MODULE, }, .probe = pnx4008_wdt_probe, .remove = pnx4008_wdt_remove, @@ -354,3 +355,4 @@ MODULE_PARM_DESC(nowayout, MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:watchdog"); diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 7645e881215..98532c0e068 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -561,3 +561,4 @@ MODULE_AUTHOR("Ben Dooks , " MODULE_DESCRIPTION("S3C2410 Watchdog Device Driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:s3c2410-wdt"); diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c index 328b3c7211e..57cefef27ce 100644 --- a/drivers/watchdog/txx9wdt.c +++ b/drivers/watchdog/txx9wdt.c @@ -274,3 +274,4 @@ module_exit(watchdog_exit); MODULE_DESCRIPTION("TXx9 Watchdog Driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS("platform:txx9wdt"); -- cgit v1.2.3 From ad28a07bcadc5945f7a90d9de3a196825e69d9d3 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 10 Apr 2008 21:29:25 -0700 Subject: rtc: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable RTC platform drivers, to re-enable module auto loading. [dbrownell@users.sourceforge.net: more drivers, minor fix] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Cc: Greg KH Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/rtc-at32ap700x.c | 2 +- drivers/rtc/rtc-at91rm9200.c | 1 + drivers/rtc/rtc-bfin.c | 1 + drivers/rtc/rtc-cmos.c | 3 +++ drivers/rtc/rtc-ds1216.c | 1 + drivers/rtc/rtc-ds1511.c | 3 +++ drivers/rtc/rtc-ds1553.c | 3 +++ drivers/rtc/rtc-ds1742.c | 1 + drivers/rtc/rtc-ep93xx.c | 3 +++ drivers/rtc/rtc-m48t59.c | 3 +++ drivers/rtc/rtc-m48t86.c | 1 + drivers/rtc/rtc-omap.c | 2 +- drivers/rtc/rtc-rs5c313.c | 1 + drivers/rtc/rtc-s3c.c | 1 + drivers/rtc/rtc-sa1100.c | 1 + drivers/rtc/rtc-sh.c | 1 + drivers/rtc/rtc-stk17ta8.c | 3 +++ drivers/rtc/rtc-v3020.c | 1 + drivers/rtc/rtc-vr41xx.c | 3 +++ 19 files changed, 33 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c index d3b9b14267a..42244f14b41 100644 --- a/drivers/rtc/rtc-at32ap700x.c +++ b/drivers/rtc/rtc-at32ap700x.c @@ -290,7 +290,7 @@ static int __exit at32_rtc_remove(struct platform_device *pdev) return 0; } -MODULE_ALIAS("at32ap700x_rtc"); +MODULE_ALIAS("platform:at32ap700x_rtc"); static struct platform_driver at32_rtc_driver = { .remove = __exit_p(at32_rtc_remove), diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index 33795e5a559..52abffc86bc 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -407,3 +407,4 @@ module_exit(at91_rtc_exit); MODULE_AUTHOR("Rick Bronson"); MODULE_DESCRIPTION("RTC driver for Atmel AT91RM9200"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:at91_rtc"); diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index d90ba860d21..4f28045d9ef 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c @@ -470,3 +470,4 @@ module_exit(bfin_rtc_exit); MODULE_DESCRIPTION("Blackfin On-Chip Real Time Clock Driver"); MODULE_AUTHOR("Mike Frysinger "); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:rtc-bfin"); diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index f3ee2ad566b..b48517021ee 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -943,6 +943,9 @@ static void cmos_platform_shutdown(struct platform_device *pdev) cmos_do_shutdown(); } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:rtc_cmos"); + static struct platform_driver cmos_platform_driver = { .remove = __exit_p(cmos_platform_remove), .shutdown = cmos_platform_shutdown, diff --git a/drivers/rtc/rtc-ds1216.c b/drivers/rtc/rtc-ds1216.c index 83efb88f8f2..0b17770b032 100644 --- a/drivers/rtc/rtc-ds1216.c +++ b/drivers/rtc/rtc-ds1216.c @@ -221,6 +221,7 @@ MODULE_AUTHOR("Thomas Bogendoerfer "); MODULE_DESCRIPTION("DS1216 RTC driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); +MODULE_ALIAS("platform:rtc-ds1216"); module_init(ds1216_rtc_init); module_exit(ds1216_rtc_exit); diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index d74b8086fa3..d08912f18dd 100644 --- a/drivers/rtc/rtc-ds1511.c +++ b/drivers/rtc/rtc-ds1511.c @@ -626,6 +626,9 @@ ds1511_rtc_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:ds1511"); + static struct platform_driver ds1511_rtc_driver = { .probe = ds1511_rtc_probe, .remove = __devexit_p(ds1511_rtc_remove), diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c index d9e848dcd45..a19f1141554 100644 --- a/drivers/rtc/rtc-ds1553.c +++ b/drivers/rtc/rtc-ds1553.c @@ -391,6 +391,9 @@ static int __devexit ds1553_rtc_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:rtc-ds1553"); + static struct platform_driver ds1553_rtc_driver = { .probe = ds1553_rtc_probe, .remove = __devexit_p(ds1553_rtc_remove), diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c index 2e73f0b183b..24d35ede2db 100644 --- a/drivers/rtc/rtc-ds1742.c +++ b/drivers/rtc/rtc-ds1742.c @@ -276,3 +276,4 @@ MODULE_AUTHOR("Atsushi Nemoto "); MODULE_DESCRIPTION("Dallas DS1742 RTC driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); +MODULE_ALIAS("platform:rtc-ds1742"); diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index ef4f147f3c0..1e99325270d 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c @@ -132,6 +132,9 @@ static int __devexit ep93xx_rtc_remove(struct platform_device *dev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:ep93xx-rtc"); + static struct platform_driver ep93xx_rtc_platform_driver = { .driver = { .name = "ep93xx-rtc", diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index cd0bbc0e803..013e6c103b9 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c @@ -465,6 +465,9 @@ static int __devexit m48t59_rtc_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:rtc-m48t59"); + static struct platform_driver m48t59_rtc_driver = { .driver = { .name = "rtc-m48t59", diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index 8ff4a1221f5..3f7f99a5d96 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c @@ -199,6 +199,7 @@ MODULE_AUTHOR("Alessandro Zummo "); MODULE_DESCRIPTION("M48T86 RTC driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); +MODULE_ALIAS("platform:rtc-m48t86"); module_init(m48t86_rtc_init); module_exit(m48t86_rtc_exit); diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index a2f84f16958..58f81c77494 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -497,7 +497,7 @@ static void omap_rtc_shutdown(struct platform_device *pdev) rtc_write(0, OMAP_RTC_INTERRUPTS_REG); } -MODULE_ALIAS("omap_rtc"); +MODULE_ALIAS("platform:omap_rtc"); static struct platform_driver omap_rtc_driver = { .probe = omap_rtc_probe, .remove = __devexit_p(omap_rtc_remove), diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c index 66eb133bf5f..664e89a817e 100644 --- a/drivers/rtc/rtc-rs5c313.c +++ b/drivers/rtc/rtc-rs5c313.c @@ -421,3 +421,4 @@ MODULE_VERSION(DRV_VERSION); MODULE_AUTHOR("kogiidena , Nobuhiro Iwamatsu "); MODULE_DESCRIPTION("Ricoh RS5C313 RTC device driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" DRV_NAME); diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 86766f1f249..9f4d5129a49 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -592,3 +592,4 @@ module_exit(s3c_rtc_exit); MODULE_DESCRIPTION("Samsung S3C RTC Driver"); MODULE_AUTHOR("Ben Dooks "); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:s3c2410-rtc"); diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index ee253cc45de..82f62d25f92 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c @@ -399,3 +399,4 @@ module_exit(sa1100_rtc_exit); MODULE_AUTHOR("Richard Purdie "); MODULE_DESCRIPTION("SA11x0/PXA2xx Realtime Clock Driver (RTC)"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:sa1100-rtc"); diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index c1d6a1880cc..9e9caa5d7f5 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -664,3 +664,4 @@ MODULE_DESCRIPTION("SuperH on-chip RTC driver"); MODULE_VERSION(DRV_VERSION); MODULE_AUTHOR("Paul Mundt , Jamie Lenehan "); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" DRV_NAME); diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c index a265da7c6ff..31d3c8c2858 100644 --- a/drivers/rtc/rtc-stk17ta8.c +++ b/drivers/rtc/rtc-stk17ta8.c @@ -394,6 +394,9 @@ static int __devexit stk17ta8_rtc_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:stk17ta8"); + static struct platform_driver stk17ta8_rtc_driver = { .probe = stk17ta8_rtc_probe, .remove = __devexit_p(stk17ta8_rtc_remove), diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c index a6b572978dc..24203a06051 100644 --- a/drivers/rtc/rtc-v3020.c +++ b/drivers/rtc/rtc-v3020.c @@ -264,3 +264,4 @@ module_exit(v3020_exit); MODULE_DESCRIPTION("V3020 RTC"); MODULE_AUTHOR("Raphael Assenat"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:v3020"); diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index ce2f78de7a8..be9c70d0b19 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c @@ -422,6 +422,9 @@ static int __devexit rtc_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:RTC"); + static struct platform_driver rtc_platform_driver = { .probe = rtc_probe, .remove = __devexit_p(rtc_remove), -- cgit v1.2.3 From 231bc2a222411f43bfb0fbb6d64c0f34c7b1039f Mon Sep 17 00:00:00 2001 From: Mike Pagano Date: Thu, 10 Apr 2008 21:29:26 -0700 Subject: cciss: error: implicit declaration of function 'sg_init_table' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds the missing include directive to the cciss.c source file.   This was discovered by our release team when building the kernel for the Alpha architecture. Errors were found as references to functions 'sg_init_table' and 'sg_page' do not exist without the include for Alpha. Signed-off-by: Mike Pagano Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/block/cciss.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 55bd35c0f08..9c9627e8e33 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -50,6 +50,7 @@ #include #include #include +#include #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) #define DRIVER_NAME "HP CISS Driver (v 3.6.14)" -- cgit v1.2.3 From bd2ab67030e9116f1e4aae1289220255412b37fd Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 10 Apr 2008 21:29:27 -0700 Subject: md: close a livelock window in handle_parity_checks5 If a failure is detected after a parity check operation has been initiated, but before it completes handle_parity_checks5 will never quiesce operations on the stripe. Explicitly handle this case by "canceling" the parity check, i.e. clear the STRIPE_OP_CHECK flags and queue the stripe on the handle list again to refresh any non-uptodate blocks. Kernel versions >= 2.6.23 are susceptible. Cc: Cc: NeilBrown Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/raid5.c | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) (limited to 'drivers') diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index c574cf5efb5..b162b839a66 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2348,25 +2348,15 @@ static void handle_issuing_new_write_requests6(raid5_conf_t *conf, static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh, struct stripe_head_state *s, int disks) { + int canceled_check = 0; + set_bit(STRIPE_HANDLE, &sh->state); - /* Take one of the following actions: - * 1/ start a check parity operation if (uptodate == disks) - * 2/ finish a check parity operation and act on the result - * 3/ skip to the writeback section if we previously - * initiated a recovery operation - */ - if (s->failed == 0 && - !test_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending)) { - if (!test_and_set_bit(STRIPE_OP_CHECK, &sh->ops.pending)) { - BUG_ON(s->uptodate != disks); - clear_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags); - sh->ops.count++; - s->uptodate--; - } else if ( - test_and_clear_bit(STRIPE_OP_CHECK, &sh->ops.complete)) { - clear_bit(STRIPE_OP_CHECK, &sh->ops.ack); - clear_bit(STRIPE_OP_CHECK, &sh->ops.pending); + /* complete a check operation */ + if (test_and_clear_bit(STRIPE_OP_CHECK, &sh->ops.complete)) { + clear_bit(STRIPE_OP_CHECK, &sh->ops.ack); + clear_bit(STRIPE_OP_CHECK, &sh->ops.pending); + if (s->failed == 0) { if (sh->ops.zero_sum_result == 0) /* parity is correct (on disc, * not in buffer any more) @@ -2391,7 +2381,8 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh, s->uptodate++; } } - } + } else + canceled_check = 1; /* STRIPE_INSYNC is not set */ } /* check if we can clear a parity disk reconstruct */ @@ -2404,12 +2395,28 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh, clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending); } + /* start a new check operation if there are no failures, the stripe is + * not insync, and a repair is not in flight + */ + if (s->failed == 0 && + !test_bit(STRIPE_INSYNC, &sh->state) && + !test_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending)) { + if (!test_and_set_bit(STRIPE_OP_CHECK, &sh->ops.pending)) { + BUG_ON(s->uptodate != disks); + clear_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags); + sh->ops.count++; + s->uptodate--; + } + } + /* Wait for check parity and compute block operations to complete - * before write-back + * before write-back. If a failure occurred while the check operation + * was in flight we need to cycle this stripe through handle_stripe + * since the parity block may not be uptodate */ - if (!test_bit(STRIPE_INSYNC, &sh->state) && - !test_bit(STRIPE_OP_CHECK, &sh->ops.pending) && - !test_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending)) { + if (!canceled_check && !test_bit(STRIPE_INSYNC, &sh->state) && + !test_bit(STRIPE_OP_CHECK, &sh->ops.pending) && + !test_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending)) { struct r5dev *dev; /* either failed parity check, or recovery is happening */ if (s->failed == 0) -- cgit v1.2.3 From aeb74914ef0e6746f15b11c0399048de9c5c05b8 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sat, 12 Apr 2008 00:11:35 -0400 Subject: [libata] sata_svw: fix reversed port count According to Broadcom, two chips have their port counts flipped. The proper count is: 0x241 is 8 ports 0x242 is 4 ports Reported by Yohei Honda on kernel bz 10424. Signed-off-by: Jeff Garzik --- drivers/ata/sata_svw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c index 840d1c4a785..019e367b59f 100644 --- a/drivers/ata/sata_svw.c +++ b/drivers/ata/sata_svw.c @@ -531,8 +531,8 @@ static int k2_sata_init_one(struct pci_dev *pdev, const struct pci_device_id *en * */ static const struct pci_device_id k2_sata_pci_tbl[] = { { PCI_VDEVICE(SERVERWORKS, 0x0240), chip_svw4 }, - { PCI_VDEVICE(SERVERWORKS, 0x0241), chip_svw4 }, - { PCI_VDEVICE(SERVERWORKS, 0x0242), chip_svw8 }, + { PCI_VDEVICE(SERVERWORKS, 0x0241), chip_svw8 }, + { PCI_VDEVICE(SERVERWORKS, 0x0242), chip_svw4 }, { PCI_VDEVICE(SERVERWORKS, 0x024a), chip_svw4 }, { PCI_VDEVICE(SERVERWORKS, 0x024b), chip_svw4 }, { PCI_VDEVICE(SERVERWORKS, 0x0410), chip_svw42 }, -- cgit v1.2.3 From 1892225f788a73beae2ec26f6f2fa4cd2e5868d0 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Fri, 11 Apr 2008 20:28:27 +0300 Subject: [libata] make ali_atapi_dma static This patch makes the needlessly global ali_atapi_dma static. Signed-off-by: Adrian Bunk Signed-off-by: Jeff Garzik --- drivers/ata/pata_ali.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index ce830fe3a36..511a830b625 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c @@ -36,7 +36,7 @@ #define DRV_NAME "pata_ali" #define DRV_VERSION "0.7.5" -int ali_atapi_dma = 0; +static int ali_atapi_dma = 0; module_param_named(atapi_dma, ali_atapi_dma, int, 0644); MODULE_PARM_DESC(atapi_dma, "Enable ATAPI DMA (0=disable, 1=enable)"); -- cgit v1.2.3 From 0517deed78be9cc9ce9799bf15da58fd0d2078bb Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Tue, 15 Apr 2008 00:49:04 -0700 Subject: netconsole: only set CON_PRINTBUFFER if the user specifies a netconsole Since 0bcc1816188e570bde1d56a208996660f2633ae0 (netconsole: Support dynamic reconfiguration using configfs), the netconsole is always registered, regardless of whether the user actually specified a netconsole configuration on the command line. However because netconsole has CON_PRINTBUFFER set, when it is registered it causes the printk buffer to be replayed to all consoles. When there is no netconsole configured this is a) pointless, and b) somewhat annoying for the user of the existing console. So instead we should only set CON_PRINTBUFFER if there is a netconsole configuration found on the command line. This retains the existing behaviour if a netconsole is setup by the user, and avoids spamming other consoles when we're only registering for the dynamic netconsole case. Signed-off-by: Michael Ellerman Signed-off-by: David S. Miller --- drivers/net/netconsole.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 501e451be91..665341e4305 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -730,7 +730,7 @@ static void write_msg(struct console *con, const char *msg, unsigned int len) static struct console netconsole = { .name = "netcon", - .flags = CON_ENABLED | CON_PRINTBUFFER, + .flags = CON_ENABLED, .write = write_msg, }; @@ -749,6 +749,9 @@ static int __init init_netconsole(void) err = PTR_ERR(nt); goto fail; } + /* Dump existing printks when we register */ + netconsole.flags |= CON_PRINTBUFFER; + spin_lock_irqsave(&target_list_lock, flags); list_add(&nt->list, &target_list); spin_unlock_irqrestore(&target_list_lock, flags); -- cgit v1.2.3 From aa979a6acbb468b0ebe8cf36dc782a5b3cc1e28d Mon Sep 17 00:00:00 2001 From: Herton Ronaldo Krzesinski Date: Wed, 9 Apr 2008 16:38:31 -0300 Subject: rtl8187: Add missing priv->vif assignments This adds missing priv->vif assignments after "mac80211: don't use interface indices in drivers" change. As rtl8180, rtl8187 also needs priv->vif to be set, as without this an oops can happen in rtl8187_tx function (priv->vif is passed to ieee80211_rts_duration). Signed-off-by: Herton Ronaldo Krzesinski Acked-by: Pavel Roskin Signed-off-by: John W. Linville --- drivers/net/wireless/rtl8187_dev.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index f44505994a0..133b3f39eeb 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c @@ -509,6 +509,8 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev, return -EOPNOTSUPP; } + priv->vif = conf->vif; + rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); for (i = 0; i < ETH_ALEN; i++) rtl818x_iowrite8(priv, &priv->map->MAC[i], @@ -523,6 +525,7 @@ static void rtl8187_remove_interface(struct ieee80211_hw *dev, { struct rtl8187_priv *priv = dev->priv; priv->mode = IEEE80211_IF_TYPE_MNTR; + priv->vif = NULL; } static int rtl8187_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf) -- cgit v1.2.3 From 385f848a986b4677bc91e5f5f9033449a876819d Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Sun, 6 Apr 2008 17:10:53 +0200 Subject: b43legacy: fix initvals loading on bcm4303 This allows for the correct initial values to be uploaded to bcm4303 devices. It should be correct, but I can't reliably test this as I suspect there's something going wrong with an hardware rfkill switch on my laptop. Please test. Signed-off-by: Stefano Brivio Signed-off-by: John W. Linville --- drivers/net/wireless/b43legacy/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 5f3f34e1dbf..0f7a6e7bd96 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -1488,6 +1488,7 @@ static int b43legacy_request_firmware(struct b43legacy_wldev *dev) } if (!fw->initvals) { switch (dev->phy.type) { + case B43legacy_PHYTYPE_B: case B43legacy_PHYTYPE_G: if ((rev >= 5) && (rev <= 10)) filename = "b0g0initvals5"; @@ -1505,6 +1506,7 @@ static int b43legacy_request_firmware(struct b43legacy_wldev *dev) } if (!fw->initvals_band) { switch (dev->phy.type) { + case B43legacy_PHYTYPE_B: case B43legacy_PHYTYPE_G: if ((rev >= 5) && (rev <= 10)) filename = "b0g0bsinitvals5"; -- cgit v1.2.3 From 4ac58469f13028e1eb97f8bc7b0fca5072591d8d Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Fri, 11 Apr 2008 11:59:00 +0200 Subject: ssb: Fix usage of struct device used for DMAing This fixes DMA on architectures where DMA is nontrivial, like PPC64. We must use the host-device's (PCI) struct device for any DMA operation instead of the SSB device. For this we add a new struct device pointer to the SSB device structure that will always point to the right device for DMAing. Without this patch b43 and b44 drivers won't work on complex-DMA architectures, that for example need dev->archdata for DMA operations. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville --- drivers/net/b44.c | 52 +++++++++++++++++++++--------------------- drivers/net/wireless/b43/dma.c | 27 +++++++++++----------- drivers/ssb/main.c | 14 +++++++----- 3 files changed, 48 insertions(+), 45 deletions(-) (limited to 'drivers') diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 25f1337cd02..59dce6aa086 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -148,7 +148,7 @@ static inline void b44_sync_dma_desc_for_device(struct ssb_device *sdev, unsigned long offset, enum dma_data_direction dir) { - dma_sync_single_range_for_device(sdev->dev, dma_base, + dma_sync_single_range_for_device(sdev->dma_dev, dma_base, offset & dma_desc_align_mask, dma_desc_sync_size, dir); } @@ -158,7 +158,7 @@ static inline void b44_sync_dma_desc_for_cpu(struct ssb_device *sdev, unsigned long offset, enum dma_data_direction dir) { - dma_sync_single_range_for_cpu(sdev->dev, dma_base, + dma_sync_single_range_for_cpu(sdev->dma_dev, dma_base, offset & dma_desc_align_mask, dma_desc_sync_size, dir); } @@ -613,7 +613,7 @@ static void b44_tx(struct b44 *bp) BUG_ON(skb == NULL); - dma_unmap_single(bp->sdev->dev, + dma_unmap_single(bp->sdev->dma_dev, rp->mapping, skb->len, DMA_TO_DEVICE); @@ -653,7 +653,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) if (skb == NULL) return -ENOMEM; - mapping = dma_map_single(bp->sdev->dev, skb->data, + mapping = dma_map_single(bp->sdev->dma_dev, skb->data, RX_PKT_BUF_SZ, DMA_FROM_DEVICE); @@ -663,19 +663,19 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) { /* Sigh... */ if (!dma_mapping_error(mapping)) - dma_unmap_single(bp->sdev->dev, mapping, + dma_unmap_single(bp->sdev->dma_dev, mapping, RX_PKT_BUF_SZ, DMA_FROM_DEVICE); dev_kfree_skb_any(skb); skb = __netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ, GFP_ATOMIC|GFP_DMA); if (skb == NULL) return -ENOMEM; - mapping = dma_map_single(bp->sdev->dev, skb->data, + mapping = dma_map_single(bp->sdev->dma_dev, skb->data, RX_PKT_BUF_SZ, DMA_FROM_DEVICE); if (dma_mapping_error(mapping) || mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) { if (!dma_mapping_error(mapping)) - dma_unmap_single(bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE); + dma_unmap_single(bp->sdev->dma_dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE); dev_kfree_skb_any(skb); return -ENOMEM; } @@ -750,7 +750,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) dest_idx * sizeof(dest_desc), DMA_BIDIRECTIONAL); - dma_sync_single_for_device(bp->sdev->dev, le32_to_cpu(src_desc->addr), + dma_sync_single_for_device(bp->sdev->dma_dev, le32_to_cpu(src_desc->addr), RX_PKT_BUF_SZ, DMA_FROM_DEVICE); } @@ -772,7 +772,7 @@ static int b44_rx(struct b44 *bp, int budget) struct rx_header *rh; u16 len; - dma_sync_single_for_cpu(bp->sdev->dev, map, + dma_sync_single_for_cpu(bp->sdev->dma_dev, map, RX_PKT_BUF_SZ, DMA_FROM_DEVICE); rh = (struct rx_header *) skb->data; @@ -806,7 +806,7 @@ static int b44_rx(struct b44 *bp, int budget) skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod); if (skb_size < 0) goto drop_it; - dma_unmap_single(bp->sdev->dev, map, + dma_unmap_single(bp->sdev->dma_dev, map, skb_size, DMA_FROM_DEVICE); /* Leave out rx_header */ skb_put(skb, len + RX_PKT_OFFSET); @@ -966,24 +966,24 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev) goto err_out; } - mapping = dma_map_single(bp->sdev->dev, skb->data, len, DMA_TO_DEVICE); + mapping = dma_map_single(bp->sdev->dma_dev, skb->data, len, DMA_TO_DEVICE); if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) { struct sk_buff *bounce_skb; /* Chip can't handle DMA to/from >1GB, use bounce buffer */ if (!dma_mapping_error(mapping)) - dma_unmap_single(bp->sdev->dev, mapping, len, + dma_unmap_single(bp->sdev->dma_dev, mapping, len, DMA_TO_DEVICE); bounce_skb = __dev_alloc_skb(len, GFP_ATOMIC | GFP_DMA); if (!bounce_skb) goto err_out; - mapping = dma_map_single(bp->sdev->dev, bounce_skb->data, + mapping = dma_map_single(bp->sdev->dma_dev, bounce_skb->data, len, DMA_TO_DEVICE); if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) { if (!dma_mapping_error(mapping)) - dma_unmap_single(bp->sdev->dev, mapping, + dma_unmap_single(bp->sdev->dma_dev, mapping, len, DMA_TO_DEVICE); dev_kfree_skb_any(bounce_skb); goto err_out; @@ -1082,7 +1082,7 @@ static void b44_free_rings(struct b44 *bp) if (rp->skb == NULL) continue; - dma_unmap_single(bp->sdev->dev, rp->mapping, RX_PKT_BUF_SZ, + dma_unmap_single(bp->sdev->dma_dev, rp->mapping, RX_PKT_BUF_SZ, DMA_FROM_DEVICE); dev_kfree_skb_any(rp->skb); rp->skb = NULL; @@ -1094,7 +1094,7 @@ static void b44_free_rings(struct b44 *bp) if (rp->skb == NULL) continue; - dma_unmap_single(bp->sdev->dev, rp->mapping, rp->skb->len, + dma_unmap_single(bp->sdev->dma_dev, rp->mapping, rp->skb->len, DMA_TO_DEVICE); dev_kfree_skb_any(rp->skb); rp->skb = NULL; @@ -1117,12 +1117,12 @@ static void b44_init_rings(struct b44 *bp) memset(bp->tx_ring, 0, B44_TX_RING_BYTES); if (bp->flags & B44_FLAG_RX_RING_HACK) - dma_sync_single_for_device(bp->sdev->dev, bp->rx_ring_dma, + dma_sync_single_for_device(bp->sdev->dma_dev, bp->rx_ring_dma, DMA_TABLE_BYTES, DMA_BIDIRECTIONAL); if (bp->flags & B44_FLAG_TX_RING_HACK) - dma_sync_single_for_device(bp->sdev->dev, bp->tx_ring_dma, + dma_sync_single_for_device(bp->sdev->dma_dev, bp->tx_ring_dma, DMA_TABLE_BYTES, DMA_TO_DEVICE); @@ -1144,24 +1144,24 @@ static void b44_free_consistent(struct b44 *bp) bp->tx_buffers = NULL; if (bp->rx_ring) { if (bp->flags & B44_FLAG_RX_RING_HACK) { - dma_unmap_single(bp->sdev->dev, bp->rx_ring_dma, + dma_unmap_single(bp->sdev->dma_dev, bp->rx_ring_dma, DMA_TABLE_BYTES, DMA_BIDIRECTIONAL); kfree(bp->rx_ring); } else - dma_free_coherent(bp->sdev->dev, DMA_TABLE_BYTES, + dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES, bp->rx_ring, bp->rx_ring_dma); bp->rx_ring = NULL; bp->flags &= ~B44_FLAG_RX_RING_HACK; } if (bp->tx_ring) { if (bp->flags & B44_FLAG_TX_RING_HACK) { - dma_unmap_single(bp->sdev->dev, bp->tx_ring_dma, + dma_unmap_single(bp->sdev->dma_dev, bp->tx_ring_dma, DMA_TABLE_BYTES, DMA_TO_DEVICE); kfree(bp->tx_ring); } else - dma_free_coherent(bp->sdev->dev, DMA_TABLE_BYTES, + dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES, bp->tx_ring, bp->tx_ring_dma); bp->tx_ring = NULL; bp->flags &= ~B44_FLAG_TX_RING_HACK; @@ -1187,7 +1187,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp) goto out_err; size = DMA_TABLE_BYTES; - bp->rx_ring = dma_alloc_coherent(bp->sdev->dev, size, &bp->rx_ring_dma, gfp); + bp->rx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size, &bp->rx_ring_dma, gfp); if (!bp->rx_ring) { /* Allocation may have failed due to pci_alloc_consistent insisting on use of GFP_DMA, which is more restrictive @@ -1199,7 +1199,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp) if (!rx_ring) goto out_err; - rx_ring_dma = dma_map_single(bp->sdev->dev, rx_ring, + rx_ring_dma = dma_map_single(bp->sdev->dma_dev, rx_ring, DMA_TABLE_BYTES, DMA_BIDIRECTIONAL); @@ -1214,7 +1214,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp) bp->flags |= B44_FLAG_RX_RING_HACK; } - bp->tx_ring = dma_alloc_coherent(bp->sdev->dev, size, &bp->tx_ring_dma, gfp); + bp->tx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size, &bp->tx_ring_dma, gfp); if (!bp->tx_ring) { /* Allocation may have failed due to dma_alloc_coherent insisting on use of GFP_DMA, which is more restrictive @@ -1226,7 +1226,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp) if (!tx_ring) goto out_err; - tx_ring_dma = dma_map_single(bp->sdev->dev, tx_ring, + tx_ring_dma = dma_map_single(bp->sdev->dma_dev, tx_ring, DMA_TABLE_BYTES, DMA_TO_DEVICE); diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 948eb1fe916..48e912487b1 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c @@ -373,10 +373,10 @@ static inline dma_addr_t dmaaddr; if (tx) { - dmaaddr = dma_map_single(ring->dev->dev->dev, + dmaaddr = dma_map_single(ring->dev->dev->dma_dev, buf, len, DMA_TO_DEVICE); } else { - dmaaddr = dma_map_single(ring->dev->dev->dev, + dmaaddr = dma_map_single(ring->dev->dev->dma_dev, buf, len, DMA_FROM_DEVICE); } @@ -388,9 +388,10 @@ static inline dma_addr_t addr, size_t len, int tx) { if (tx) { - dma_unmap_single(ring->dev->dev->dev, addr, len, DMA_TO_DEVICE); + dma_unmap_single(ring->dev->dev->dma_dev, + addr, len, DMA_TO_DEVICE); } else { - dma_unmap_single(ring->dev->dev->dev, + dma_unmap_single(ring->dev->dev->dma_dev, addr, len, DMA_FROM_DEVICE); } } @@ -400,7 +401,7 @@ static inline dma_addr_t addr, size_t len) { B43_WARN_ON(ring->tx); - dma_sync_single_for_cpu(ring->dev->dev->dev, + dma_sync_single_for_cpu(ring->dev->dev->dma_dev, addr, len, DMA_FROM_DEVICE); } @@ -409,7 +410,7 @@ static inline dma_addr_t addr, size_t len) { B43_WARN_ON(ring->tx); - dma_sync_single_for_device(ring->dev->dev->dev, + dma_sync_single_for_device(ring->dev->dev->dma_dev, addr, len, DMA_FROM_DEVICE); } @@ -425,7 +426,7 @@ static inline static int alloc_ringmemory(struct b43_dmaring *ring) { - struct device *dev = ring->dev->dev->dev; + struct device *dma_dev = ring->dev->dev->dma_dev; gfp_t flags = GFP_KERNEL; /* The specs call for 4K buffers for 30- and 32-bit DMA with 4K @@ -439,7 +440,7 @@ static int alloc_ringmemory(struct b43_dmaring *ring) */ if (ring->type == B43_DMA_64BIT) flags |= GFP_DMA; - ring->descbase = dma_alloc_coherent(dev, B43_DMA_RINGMEMSIZE, + ring->descbase = dma_alloc_coherent(dma_dev, B43_DMA_RINGMEMSIZE, &(ring->dmabase), flags); if (!ring->descbase) { b43err(ring->dev->wl, "DMA ringmemory allocation failed\n"); @@ -452,9 +453,9 @@ static int alloc_ringmemory(struct b43_dmaring *ring) static void free_ringmemory(struct b43_dmaring *ring) { - struct device *dev = ring->dev->dev->dev; + struct device *dma_dev = ring->dev->dev->dma_dev; - dma_free_coherent(dev, B43_DMA_RINGMEMSIZE, + dma_free_coherent(dma_dev, B43_DMA_RINGMEMSIZE, ring->descbase, ring->dmabase); } @@ -854,7 +855,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, goto err_kfree_meta; /* test for ability to dma to txhdr_cache */ - dma_test = dma_map_single(dev->dev->dev, + dma_test = dma_map_single(dev->dev->dma_dev, ring->txhdr_cache, b43_txhdr_size(dev), DMA_TO_DEVICE); @@ -869,7 +870,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, if (!ring->txhdr_cache) goto err_kfree_meta; - dma_test = dma_map_single(dev->dev->dev, + dma_test = dma_map_single(dev->dev->dma_dev, ring->txhdr_cache, b43_txhdr_size(dev), DMA_TO_DEVICE); @@ -883,7 +884,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, } } - dma_unmap_single(dev->dev->dev, + dma_unmap_single(dev->dev->dma_dev, dma_test, b43_txhdr_size(dev), DMA_TO_DEVICE); } diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 72017bf2e57..8003a9e55ac 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -436,15 +436,18 @@ static int ssb_devices_register(struct ssb_bus *bus) #ifdef CONFIG_SSB_PCIHOST sdev->irq = bus->host_pci->irq; dev->parent = &bus->host_pci->dev; + sdev->dma_dev = &bus->host_pci->dev; #endif break; case SSB_BUSTYPE_PCMCIA: #ifdef CONFIG_SSB_PCMCIAHOST sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; dev->parent = &bus->host_pcmcia->dev; + sdev->dma_dev = &bus->host_pcmcia->dev; #endif break; case SSB_BUSTYPE_SSB: + sdev->dma_dev = dev; break; } @@ -1018,15 +1021,14 @@ EXPORT_SYMBOL(ssb_dma_translation); int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask) { - struct device *dev = ssb_dev->dev; + struct device *dma_dev = ssb_dev->dma_dev; #ifdef CONFIG_SSB_PCIHOST - if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI && - !dma_supported(dev, mask)) - return -EIO; + if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI) + return dma_set_mask(dma_dev, mask); #endif - dev->coherent_dma_mask = mask; - dev->dma_mask = &dev->coherent_dma_mask; + dma_dev->coherent_dma_mask = mask; + dma_dev->dma_mask = &dma_dev->coherent_dma_mask; return 0; } -- cgit v1.2.3 From cdbbe3d1f53086ece706674d3bf4f6d148083694 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Fri, 11 Apr 2008 12:16:36 +0200 Subject: b43legacy: Fix usage of struct device used for DMAing This fixes b43legacy for the SSB DMA API change. Signed-off-by: Michael Buesch Cc: Stefano Brivio Signed-off-by: John W. Linville --- drivers/net/wireless/b43legacy/dma.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers') diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index e87b427d5e4..59300486f48 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c @@ -393,11 +393,11 @@ dma_addr_t map_descbuffer(struct b43legacy_dmaring *ring, dma_addr_t dmaaddr; if (tx) - dmaaddr = dma_map_single(ring->dev->dev->dev, + dmaaddr = dma_map_single(ring->dev->dev->dma_dev, buf, len, DMA_TO_DEVICE); else - dmaaddr = dma_map_single(ring->dev->dev->dev, + dmaaddr = dma_map_single(ring->dev->dev->dma_dev, buf, len, DMA_FROM_DEVICE); @@ -411,11 +411,11 @@ void unmap_descbuffer(struct b43legacy_dmaring *ring, int tx) { if (tx) - dma_unmap_single(ring->dev->dev->dev, + dma_unmap_single(ring->dev->dev->dma_dev, addr, len, DMA_TO_DEVICE); else - dma_unmap_single(ring->dev->dev->dev, + dma_unmap_single(ring->dev->dev->dma_dev, addr, len, DMA_FROM_DEVICE); } @@ -427,7 +427,7 @@ void sync_descbuffer_for_cpu(struct b43legacy_dmaring *ring, { B43legacy_WARN_ON(ring->tx); - dma_sync_single_for_cpu(ring->dev->dev->dev, + dma_sync_single_for_cpu(ring->dev->dev->dma_dev, addr, len, DMA_FROM_DEVICE); } @@ -438,7 +438,7 @@ void sync_descbuffer_for_device(struct b43legacy_dmaring *ring, { B43legacy_WARN_ON(ring->tx); - dma_sync_single_for_device(ring->dev->dev->dev, + dma_sync_single_for_device(ring->dev->dev->dma_dev, addr, len, DMA_FROM_DEVICE); } @@ -458,9 +458,9 @@ void free_descriptor_buffer(struct b43legacy_dmaring *ring, static int alloc_ringmemory(struct b43legacy_dmaring *ring) { - struct device *dev = ring->dev->dev->dev; + struct device *dma_dev = ring->dev->dev->dma_dev; - ring->descbase = dma_alloc_coherent(dev, B43legacy_DMA_RINGMEMSIZE, + ring->descbase = dma_alloc_coherent(dma_dev, B43legacy_DMA_RINGMEMSIZE, &(ring->dmabase), GFP_KERNEL); if (!ring->descbase) { b43legacyerr(ring->dev->wl, "DMA ringmemory allocation" @@ -474,9 +474,9 @@ static int alloc_ringmemory(struct b43legacy_dmaring *ring) static void free_ringmemory(struct b43legacy_dmaring *ring) { - struct device *dev = ring->dev->dev->dev; + struct device *dma_dev = ring->dev->dev->dma_dev; - dma_free_coherent(dev, B43legacy_DMA_RINGMEMSIZE, + dma_free_coherent(dma_dev, B43legacy_DMA_RINGMEMSIZE, ring->descbase, ring->dmabase); } @@ -886,7 +886,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, goto err_kfree_meta; /* test for ability to dma to txhdr_cache */ - dma_test = dma_map_single(dev->dev->dev, ring->txhdr_cache, + dma_test = dma_map_single(dev->dev->dma_dev, ring->txhdr_cache, sizeof(struct b43legacy_txhdr_fw3), DMA_TO_DEVICE); @@ -900,7 +900,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, if (!ring->txhdr_cache) goto err_kfree_meta; - dma_test = dma_map_single(dev->dev->dev, + dma_test = dma_map_single(dev->dev->dma_dev, ring->txhdr_cache, sizeof(struct b43legacy_txhdr_fw3), DMA_TO_DEVICE); @@ -910,7 +910,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, goto err_kfree_txhdr_cache; } - dma_unmap_single(dev->dev->dev, + dma_unmap_single(dev->dev->dma_dev, dma_test, sizeof(struct b43legacy_txhdr_fw3), DMA_TO_DEVICE); } -- cgit v1.2.3 From dc4ae1f46dbbcd08b3b5e23ad5ef87bf4bb41adf Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 14 Apr 2008 00:59:49 +0200 Subject: b43legacy: fix DMA mapping leakage This fixes a DMA mapping leakage in the case where we reject a DMA buffer because of its address. The patch by Michael Buesch has been ported to b43legacy. Signed-off-by: Stefano Brivio Cc: Christian Casteyde Signed-off-by: John W. Linville --- drivers/net/wireless/b43legacy/dma.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'drivers') diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index 59300486f48..c990f87b107 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c @@ -585,8 +585,9 @@ static int b43legacy_dmacontroller_tx_reset(struct b43legacy_wldev *dev, /* Check if a DMA mapping address is invalid. */ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring, - dma_addr_t addr, - size_t buffersize) + dma_addr_t addr, + size_t buffersize, + bool dma_to_device) { if (unlikely(dma_mapping_error(addr))) return 1; @@ -594,11 +595,11 @@ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring, switch (ring->type) { case B43legacy_DMA_30BIT: if ((u64)addr + buffersize > (1ULL << 30)) - return 1; + goto address_error; break; case B43legacy_DMA_32BIT: if ((u64)addr + buffersize > (1ULL << 32)) - return 1; + goto address_error; break; case B43legacy_DMA_64BIT: /* Currently we can't have addresses beyond 64 bits in the kernel. */ @@ -607,6 +608,12 @@ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring, /* The address is OK. */ return 0; + +address_error: + /* We can't support this address. Unmap it again. */ + unmap_descbuffer(ring, addr, buffersize, dma_to_device); + + return 1; } static int setup_rx_descbuffer(struct b43legacy_dmaring *ring, @@ -626,7 +633,7 @@ static int setup_rx_descbuffer(struct b43legacy_dmaring *ring, return -ENOMEM; dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0); - if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { + if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) { /* ugh. try to realloc in zone_dma */ gfp_flags |= GFP_DMA; @@ -639,7 +646,7 @@ static int setup_rx_descbuffer(struct b43legacy_dmaring *ring, ring->rx_buffersize, 0); } - if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { + if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) { dev_kfree_skb_any(skb); return -EIO; } @@ -891,7 +898,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, DMA_TO_DEVICE); if (b43legacy_dma_mapping_error(ring, dma_test, - sizeof(struct b43legacy_txhdr_fw3))) { + sizeof(struct b43legacy_txhdr_fw3), 1)) { /* ugh realloc */ kfree(ring->txhdr_cache); ring->txhdr_cache = kcalloc(nr_slots, @@ -906,7 +913,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, DMA_TO_DEVICE); if (b43legacy_dma_mapping_error(ring, dma_test, - sizeof(struct b43legacy_txhdr_fw3))) + sizeof(struct b43legacy_txhdr_fw3), 1)) goto err_kfree_txhdr_cache; } @@ -1235,7 +1242,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring, meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header, sizeof(struct b43legacy_txhdr_fw3), 1); if (b43legacy_dma_mapping_error(ring, meta_hdr->dmaaddr, - sizeof(struct b43legacy_txhdr_fw3))) { + sizeof(struct b43legacy_txhdr_fw3), 1)) { ring->current_slot = old_top_slot; ring->used_slots = old_used_slots; return -EIO; @@ -1254,7 +1261,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring, meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); /* create a bounce buffer in zone_dma on mapping failure. */ - if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { + if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) { bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); if (!bounce_skb) { ring->current_slot = old_top_slot; @@ -1268,7 +1275,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring, skb = bounce_skb; meta->skb = skb; meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); - if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { + if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) { ring->current_slot = old_top_slot; ring->used_slots = old_used_slots; err = -EIO; -- cgit v1.2.3 From b358492cd2a9c67bff352c5a60d86e7fc9627477 Mon Sep 17 00:00:00 2001 From: Masakazu Mokuno Date: Mon, 14 Apr 2008 18:07:21 +0900 Subject: PS3: gelic: fix the oops on the broken IE returned from the hypervisor This fixes the bug that the driver would try to over-scan the memory if the sum of the length field of every IEs does not match the length returned from the hypervisor. Signed-off-by: Masakazu Mokuno Signed-off-by: John W. Linville --- drivers/net/ps3_gelic_wireless.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index ddbc6e475e2..c16de5129a7 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c @@ -512,13 +512,18 @@ static void gelic_wl_parse_ie(u8 *data, size_t len, data, len); memset(ie_info, 0, sizeof(struct ie_info)); - while (0 < data_left) { + while (2 <= data_left) { item_id = *pos++; item_len = *pos++; + data_left -= 2; + + if (data_left < item_len) + break; switch (item_id) { case MFIE_TYPE_GENERIC: - if (!memcmp(pos, wpa_oui, OUI_LEN) && + if ((OUI_LEN + 1 <= item_len) && + !memcmp(pos, wpa_oui, OUI_LEN) && pos[OUI_LEN] == 0x01) { ie_info->wpa.data = pos - 2; ie_info->wpa.len = item_len + 2; @@ -535,7 +540,7 @@ static void gelic_wl_parse_ie(u8 *data, size_t len, break; } pos += item_len; - data_left -= item_len + 2; + data_left -= item_len; } pr_debug("%s: wpa=%p,%d wpa2=%p,%d\n", __func__, ie_info->wpa.data, ie_info->wpa.len, -- cgit v1.2.3 From bc65c724d5a2c61539b2c52680941505152fcf30 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 15 Apr 2008 14:34:28 -0700 Subject: mmc: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable MMC host platform drivers, to re-enable auto loading. Also, add missing owner declarations in driver init. [dbrownell@users.sourceforge.net: registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Acked-by: Pierre Ossman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mmc/host/at91_mci.c | 1 + drivers/mmc/host/au1xmmc.c | 2 ++ drivers/mmc/host/imxmmc.c | 2 ++ drivers/mmc/host/omap.c | 3 ++- drivers/mmc/host/pxamci.c | 2 ++ drivers/mmc/host/wbsd.c | 1 + 6 files changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 21acecc9fe3..a28fc2f68ce 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -1075,3 +1075,4 @@ module_exit(at91_mci_exit); MODULE_DESCRIPTION("AT91 Multimedia Card Interface driver"); MODULE_AUTHOR("Nick Randell"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:at91_mci"); diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index c3926eb3bf4..cc5f7bc546a 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -998,6 +998,7 @@ static struct platform_driver au1xmmc_driver = { .resume = NULL, .driver = { .name = DRIVER_NAME, + .owner = THIS_MODULE, }, }; @@ -1018,5 +1019,6 @@ module_exit(au1xmmc_exit); MODULE_AUTHOR("Advanced Micro Devices, Inc"); MODULE_DESCRIPTION("MMC/SD driver for the Alchemy Au1XXX"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:au1xxx-mmc"); #endif diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c index f2070a19cfa..95f33e87a99 100644 --- a/drivers/mmc/host/imxmmc.c +++ b/drivers/mmc/host/imxmmc.c @@ -1128,6 +1128,7 @@ static struct platform_driver imxmci_driver = { .resume = imxmci_resume, .driver = { .name = DRIVER_NAME, + .owner = THIS_MODULE, } }; @@ -1147,3 +1148,4 @@ module_exit(imxmci_exit); MODULE_DESCRIPTION("i.MX Multimedia Card Interface Driver"); MODULE_AUTHOR("Sascha Hauer, Pengutronix"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:imx-mmc"); diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index c9dfeb15b48..90c358b57d1 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1255,6 +1255,7 @@ static struct platform_driver mmc_omap_driver = { .resume = mmc_omap_resume, .driver = { .name = DRIVER_NAME, + .owner = THIS_MODULE, }, }; @@ -1273,5 +1274,5 @@ module_exit(mmc_omap_exit); MODULE_DESCRIPTION("OMAP Multimedia Card driver"); MODULE_LICENSE("GPL"); -MODULE_ALIAS(DRIVER_NAME); +MODULE_ALIAS("platform:" DRIVER_NAME); MODULE_AUTHOR("Juha Yrjölä"); diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 1ea8482037b..65210fca37e 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -693,6 +693,7 @@ static struct platform_driver pxamci_driver = { .resume = pxamci_resume, .driver = { .name = DRIVER_NAME, + .owner = THIS_MODULE, }, }; @@ -711,3 +712,4 @@ module_exit(pxamci_exit); MODULE_DESCRIPTION("PXA Multimedia Card Interface Driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:pxa2xx-mci"); diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 4d5f3742187..be624a049c6 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -1948,6 +1948,7 @@ static struct platform_driver wbsd_driver = { .resume = wbsd_platform_resume, .driver = { .name = DRIVER_NAME, + .owner = THIS_MODULE, }, }; -- cgit v1.2.3 From 2b653e06ce2d70d21483f22ef1b1b63749c54223 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Tue, 15 Apr 2008 14:34:29 -0700 Subject: rtc: fix the error in the function of cmos_set_alarm There is a bug in the function of cmos_set_alarm. RTC alarm time for October can't be set correctly. For October: 0x0A will be written into the RTC region (MONTH_ALARM) in current kernel. But in fact 0x10 should be written. Wildcards are also not handled correctly. Signed-off-by: Zhao Yakui Signed-off-by: Zhang Rui Signed-off-by: David Brownell Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/rtc-cmos.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index b48517021ee..dcdc142a344 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -198,9 +198,8 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t) /* Writing 0xff means "don't care" or "match all". */ - mon = t->time.tm_mon; - mon = (mon < 12) ? BIN2BCD(mon) : 0xff; - mon++; + mon = t->time.tm_mon + 1; + mon = (mon <= 12) ? BIN2BCD(mon) : 0xff; mday = t->time.tm_mday; mday = (mday >= 1 && mday <= 31) ? BIN2BCD(mday) : 0xff; -- cgit v1.2.3 From 3c4ded9715c05724939c9a4bd72555c2ade71d97 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 15 Apr 2008 14:34:30 -0700 Subject: leds: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable platform LED drivers, to re-enable auto loading. [dbrownell@users.sourceforge.net: more drivers, registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Acked-by: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/leds/leds-ams-delta.c | 2 ++ drivers/leds/leds-atmel-pwm.c | 3 +++ drivers/leds/leds-clevo-mail.c | 1 + drivers/leds/leds-cm-x270.c | 2 ++ drivers/leds/leds-cobalt-qube.c | 3 +++ drivers/leds/leds-corgi.c | 2 ++ drivers/leds/leds-gpio.c | 1 + drivers/leds/leds-h1940.c | 2 ++ drivers/leds/leds-hp6xx.c | 4 ++++ drivers/leds/leds-s3c24xx.c | 1 + drivers/leds/leds-spitz.c | 2 ++ drivers/leds/leds-tosa.c | 2 ++ 12 files changed, 25 insertions(+) (limited to 'drivers') diff --git a/drivers/leds/leds-ams-delta.c b/drivers/leds/leds-ams-delta.c index 9e3077463d8..c37bb0d5a0c 100644 --- a/drivers/leds/leds-ams-delta.c +++ b/drivers/leds/leds-ams-delta.c @@ -140,6 +140,7 @@ static struct platform_driver ams_delta_led_driver = { .resume = ams_delta_led_resume, .driver = { .name = "ams-delta-led", + .owner = THIS_MODULE, }, }; @@ -159,3 +160,4 @@ module_exit(ams_delta_led_exit); MODULE_AUTHOR("Jonathan McDowell "); MODULE_DESCRIPTION("Amstrad Delta LED driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:ams-delta-led"); diff --git a/drivers/leds/leds-atmel-pwm.c b/drivers/leds/leds-atmel-pwm.c index af61f55571f..28db6c1444e 100644 --- a/drivers/leds/leds-atmel-pwm.c +++ b/drivers/leds/leds-atmel-pwm.c @@ -132,6 +132,9 @@ static int __exit pwmled_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:leds-atmel-pwm"); + static struct platform_driver pwmled_driver = { .driver = { .name = "leds-atmel-pwm", diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c index 6c3d33b8e38..5750b08b601 100644 --- a/drivers/leds/leds-clevo-mail.c +++ b/drivers/leds/leds-clevo-mail.c @@ -170,6 +170,7 @@ static struct platform_driver clevo_mail_led_driver = { .resume = clevo_mail_led_resume, .driver = { .name = KBUILD_MODNAME, + .owner = THIS_MODULE, }, }; diff --git a/drivers/leds/leds-cm-x270.c b/drivers/leds/leds-cm-x270.c index 9aebef02a97..accc7eddb78 100644 --- a/drivers/leds/leds-cm-x270.c +++ b/drivers/leds/leds-cm-x270.c @@ -101,6 +101,7 @@ static struct platform_driver cmx270led_driver = { #endif .driver = { .name = "cm-x270-led", + .owner = THIS_MODULE, }, }; @@ -120,3 +121,4 @@ module_exit(cmx270led_exit); MODULE_AUTHOR("Mike Rapoport "); MODULE_DESCRIPTION("CM-x270 LED driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:cm-x270-led"); diff --git a/drivers/leds/leds-cobalt-qube.c b/drivers/leds/leds-cobalt-qube.c index d2b54b53d80..096881a11b1 100644 --- a/drivers/leds/leds-cobalt-qube.c +++ b/drivers/leds/leds-cobalt-qube.c @@ -75,6 +75,9 @@ static int __devexit cobalt_qube_led_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:cobalt-qube-leds"); + static struct platform_driver cobalt_qube_led_driver = { .probe = cobalt_qube_led_probe, .remove = __devexit_p(cobalt_qube_led_remove), diff --git a/drivers/leds/leds-corgi.c b/drivers/leds/leds-corgi.c index e45f6c4b59b..29e931f89f9 100644 --- a/drivers/leds/leds-corgi.c +++ b/drivers/leds/leds-corgi.c @@ -99,6 +99,7 @@ static struct platform_driver corgiled_driver = { #endif .driver = { .name = "corgi-led", + .owner = THIS_MODULE, }, }; @@ -118,3 +119,4 @@ module_exit(corgiled_exit); MODULE_AUTHOR("Richard Purdie "); MODULE_DESCRIPTION("Corgi LED driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:corgi-led"); diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index 4c0b05852cb..1aae8b33213 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -199,3 +199,4 @@ module_exit(gpio_led_exit); MODULE_AUTHOR("Raphael Assenat "); MODULE_DESCRIPTION("GPIO LED driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:leds-gpio"); diff --git a/drivers/leds/leds-h1940.c b/drivers/leds/leds-h1940.c index 677c99325be..6e51c9b6102 100644 --- a/drivers/leds/leds-h1940.c +++ b/drivers/leds/leds-h1940.c @@ -139,6 +139,7 @@ static int h1940leds_remove(struct platform_device *pdev) static struct platform_driver h1940leds_driver = { .driver = { .name = "h1940-leds", + .owner = THIS_MODULE, }, .probe = h1940leds_probe, .remove = h1940leds_remove, @@ -161,3 +162,4 @@ module_exit(h1940leds_exit); MODULE_AUTHOR("Arnaud Patard "); MODULE_DESCRIPTION("LED driver for the iPAQ H1940"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:h1940-leds"); diff --git a/drivers/leds/leds-hp6xx.c b/drivers/leds/leds-hp6xx.c index 82d4ec38479..870f5a3789e 100644 --- a/drivers/leds/leds-hp6xx.c +++ b/drivers/leds/leds-hp6xx.c @@ -90,6 +90,9 @@ static int hp6xxled_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:hp6xx-led"); + static struct platform_driver hp6xxled_driver = { .probe = hp6xxled_probe, .remove = hp6xxled_remove, @@ -99,6 +102,7 @@ static struct platform_driver hp6xxled_driver = { #endif .driver = { .name = "hp6xx-led", + .owner = THIS_MODULE, }, }; diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index 0fd64075129..0d10e119d8f 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c @@ -160,3 +160,4 @@ module_exit(s3c24xx_led_exit); MODULE_AUTHOR("Ben Dooks "); MODULE_DESCRIPTION("S3C24XX LED driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:s3c24xx_led"); diff --git a/drivers/leds/leds-spitz.c b/drivers/leds/leds-spitz.c index 93e1012b17e..87007cc362c 100644 --- a/drivers/leds/leds-spitz.c +++ b/drivers/leds/leds-spitz.c @@ -105,6 +105,7 @@ static struct platform_driver spitzled_driver = { #endif .driver = { .name = "spitz-led", + .owner = THIS_MODULE, }, }; @@ -124,3 +125,4 @@ module_exit(spitzled_exit); MODULE_AUTHOR("Richard Purdie "); MODULE_DESCRIPTION("Spitz LED driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:spitz-led"); diff --git a/drivers/leds/leds-tosa.c b/drivers/leds/leds-tosa.c index 9e0a188fbb0..7ebecc41a9b 100644 --- a/drivers/leds/leds-tosa.c +++ b/drivers/leds/leds-tosa.c @@ -109,6 +109,7 @@ static struct platform_driver tosaled_driver = { .resume = tosaled_resume, .driver = { .name = "tosa-led", + .owner = THIS_MODULE, }, }; @@ -128,3 +129,4 @@ module_exit(tosaled_exit); MODULE_AUTHOR("Dirk Opfer "); MODULE_DESCRIPTION("Tosa LED driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:tosa-led"); -- cgit v1.2.3 From c43f89c2084f46e3ec59ddcbc52ecf4b1e9b015a Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 15 Apr 2008 14:34:33 -0700 Subject: fbdev: fix /proc/fb oops after module removal /proc/fb is not removed during rmmod. Steps to reproduce: modprobe fb rmmod fb ls /proc BUG: unable to handle kernel paging request at ffffffffa0094370 IP: [] proc_get_inode+0x101/0x130 PGD 203067 PUD 207063 PMD 17e758067 PTE 0 Oops: 0000 [1] SMP last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:05:02.0/resource CPU 1 Modules linked in: nf_conntrack_irc xt_state iptable_filter ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack ip_tables x_tables vfat fat usbhid ehci_hcd uhci_hcd usbcore sr_mod cdrom [last unloaded: fb] Pid: 21205, comm: ls Not tainted 2.6.25-rc8-mm2 #14 RIP: 0010:[] [] proc_get_inode+0x101/0x130 RSP: 0018:ffff81017c4bfc78 EFLAGS: 00010246 RAX: 0000000000008000 RBX: ffff8101787f5470 RCX: 0000000048011ccc RDX: ffffffffa0094320 RSI: ffff810006ad43b0 RDI: ffff81017fc2cc00 RBP: ffff81017e450300 R08: 0000000000000002 R09: ffff81017c5d1000 R10: 0000000000000000 R11: 0000000000000246 R12: ffff81016b903a28 R13: ffff81017f822020 R14: ffff81017c4bfd58 R15: ffff81017f822020 FS: 00007f08e71696f0(0000) GS:ffff81017fc06480(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: ffffffffa0094370 CR3: 000000017e54a000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process ls (pid: 21205, threadinfo ffff81017c4be000, task ffff81017de48770) Stack: ffff81017c5d1000 00000000ffffffea ffff81017e450300 ffffffff802bdd1e ffff81017f802258 ffff81017c4bfe48 ffff81016b903a28 ffff81017f822020 ffff81017c4bfd48 ffffffff802b9ba0 ffff81016b903a28 ffff81017f802258 Call Trace: [] ? proc_lookup_de+0x8e/0x100 [] ? proc_root_lookup+0x20/0x60 [] ? do_lookup+0x1b7/0x210 [] ? __link_path_walk+0x53d/0x7f0 [] ? mntput_no_expire+0x28/0x130 [] ? path_walk+0x5a/0xc0 [] ? do_path_lookup+0x83/0x1c0 [] ? getname+0xe5/0x210 [] ? __user_walk_fd+0x4b/0x80 [] ? vfs_lstat_fd+0x2c/0x70 [] ? filldir+0xae/0xf0 [] ? de_put+0x9/0x50 [] ? mnt_want_write+0x2d/0x80 [] ? touch_atime+0x1f/0x170 [] ? proc_root_readdir+0x7d/0xa0 [] ? sys_newlstat+0x27/0x50 [] ? vfs_readdir+0x9b/0xd0 [] ? sys_getdents+0xce/0xe0 [] ? system_call_after_swapgs+0x7b/0x80 Code: b7 83 b2 00 00 00 25 00 f0 00 00 3d 00 80 00 00 74 19 48 89 93 f0 00 00 00 48 89 df e8 39 9a fd ff 48 89 d8 48 83 c4 08 5b 5d c3 <48> 83 7a 50 00 48 c7 c0 60 16 45 80 48 c7 c2 40 17 45 80 48 0f RIP [] proc_get_inode+0x101/0x130 RSP CR2: ffffffffa0094370 ---[ end trace c71hiarjan8ab739 ]--- Signed-off-by: Alexey Dobriyan "Antonino A. Daplas" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/fbmem.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 1194f5e060e..01072f4b3e8 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1521,6 +1521,7 @@ module_init(fbmem_init); static void __exit fbmem_exit(void) { + remove_proc_entry("fb", NULL); class_destroy(fb_class); unregister_chrdev(FB_MAJOR, "fb"); } -- cgit v1.2.3 From d6c238503ee3d015c5f8a701b2bfbeaad90a6d4b Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 15 Apr 2008 14:34:33 -0700 Subject: misc: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable 'misc' platform drivers, to re-enable auto loading. [dbrownell@users.sourceforge.net: bugfix, registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/misc/atmel-ssc.c | 2 ++ drivers/misc/atmel_pwm.c | 1 + drivers/misc/hdpuftrs/hdpu_cpustate.c | 2 ++ drivers/misc/hdpuftrs/hdpu_nexus.c | 2 ++ 4 files changed, 7 insertions(+) (limited to 'drivers') diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index 058ccac700d..e171650766c 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c @@ -154,6 +154,7 @@ static struct platform_driver ssc_driver = { .remove = __devexit_p(ssc_remove), .driver = { .name = "ssc", + .owner = THIS_MODULE, }, }; @@ -172,3 +173,4 @@ module_exit(ssc_exit); MODULE_AUTHOR("Hans-Christian Egtvedt "); MODULE_DESCRIPTION("SSC driver for Atmel AVR32 and AT91"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:ssc"); diff --git a/drivers/misc/atmel_pwm.c b/drivers/misc/atmel_pwm.c index f8d3b9a76cb..0d5ce03cdff 100644 --- a/drivers/misc/atmel_pwm.c +++ b/drivers/misc/atmel_pwm.c @@ -407,3 +407,4 @@ module_exit(pwm_exit); MODULE_DESCRIPTION("Driver for AT32/AT91 PWM module"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:atmel_pwm"); diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c index aa8ce7abe92..302e92418bb 100644 --- a/drivers/misc/hdpuftrs/hdpu_cpustate.c +++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c @@ -164,6 +164,7 @@ static struct platform_driver hdpu_cpustate_driver = { .remove = hdpu_cpustate_remove, .driver = { .name = HDPU_CPUSTATE_NAME, + .owner = THIS_MODULE, }, }; @@ -248,3 +249,4 @@ module_exit(cpustate_exit); MODULE_AUTHOR("Brian Waite"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" HDPU_CPUSTATE_NAME); diff --git a/drivers/misc/hdpuftrs/hdpu_nexus.c b/drivers/misc/hdpuftrs/hdpu_nexus.c index 2887b214798..2fa36f7a6eb 100644 --- a/drivers/misc/hdpuftrs/hdpu_nexus.c +++ b/drivers/misc/hdpuftrs/hdpu_nexus.c @@ -55,6 +55,7 @@ static struct platform_driver hdpu_nexus_driver = { .remove = hdpu_nexus_remove, .driver = { .name = HDPU_NEXUS_NAME, + .owner = THIS_MODULE, }, }; @@ -151,3 +152,4 @@ module_exit(nexus_exit); MODULE_AUTHOR("Brian Waite"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" HDPU_NEXUS_NAME); -- cgit v1.2.3 From 12c2c019eb9b0b586a061b336766d11cca449499 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 15 Apr 2008 14:34:34 -0700 Subject: pcmcia: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable PCMCIA platform drivers, to re-enable auto loading. [dbrownell@users.sourceforge.net: registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/pcmcia/at91_cf.c | 1 + drivers/pcmcia/omap_cf.c | 2 ++ drivers/pcmcia/pxa2xx_base.c | 2 ++ 3 files changed, 5 insertions(+) (limited to 'drivers') diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 385e145e1ac..684968558c1 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c @@ -419,3 +419,4 @@ module_exit(at91_cf_exit); MODULE_DESCRIPTION("AT91 Compact Flash Driver"); MODULE_AUTHOR("David Brownell"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:at91_cf"); diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index 2df216b0081..bb6db3a582b 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c @@ -344,6 +344,7 @@ static int omap_cf_resume(struct platform_device *pdev) static struct platform_driver omap_cf_driver = { .driver = { .name = (char *) driver_name, + .owner = THIS_MODULE, }, .remove = __exit_p(omap_cf_remove), .suspend = omap_cf_suspend, @@ -368,3 +369,4 @@ module_exit(omap_cf_exit); MODULE_DESCRIPTION("OMAP CF Driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:omap_cf"); diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index e439044d88f..9414163c78e 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c @@ -239,6 +239,7 @@ static struct platform_driver pxa2xx_pcmcia_driver = { .resume = pxa2xx_drv_pcmcia_resume, .driver = { .name = "pxa2xx-pcmcia", + .owner = THIS_MODULE, }, }; @@ -258,3 +259,4 @@ module_exit(pxa2xx_pcmcia_exit); MODULE_AUTHOR("Stefan Eletzhofer and Ian Molton "); MODULE_DESCRIPTION("Linux PCMCIA Card Services: PXA2xx core socket driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:pxa2xx-pcmcia"); -- cgit v1.2.3 From e169c139642fb4c682ec12a409725508dbefa520 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 15 Apr 2008 14:34:35 -0700 Subject: serial: fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable serial platform drivers, to re-enable auto loading. NOTE that Kconfig for some of these drivers doesn't allow modular builds, and thus doesn't match the driver source's unload support. Presumably their unload code is buggy and/or weakly tested... [dbrownell@users.sourceforge.net: more drivers, registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Acked-by: Peter Korsgaard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/serial/atmel_serial.c | 1 + drivers/serial/bfin_5xx.c | 2 ++ drivers/serial/imx.c | 2 ++ drivers/serial/mcf.c | 1 + drivers/serial/mpc52xx_uart.c | 2 ++ drivers/serial/mpsc.c | 2 ++ drivers/serial/netx-serial.c | 2 ++ drivers/serial/pnx8xxx_uart.c | 1 + drivers/serial/pxa.c | 3 ++- drivers/serial/s3c2410.c | 4 ++++ drivers/serial/sa1100.c | 2 ++ drivers/serial/sc26xx.c | 2 ++ drivers/serial/sh-sci.c | 1 + drivers/serial/uartlite.c | 3 +++ drivers/serial/vr41xx_siu.c | 3 +++ 15 files changed, 30 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 430997e33fc..55492fa095a 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c @@ -1577,3 +1577,4 @@ module_exit(atmel_serial_exit); MODULE_AUTHOR("Rick Bronson"); MODULE_DESCRIPTION("Atmel AT91 / AT32 serial port driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:atmel_usart"); diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 0aa345b9a38..46bb47f37b9 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c @@ -1243,6 +1243,7 @@ static struct platform_driver bfin_serial_driver = { .resume = bfin_serial_resume, .driver = { .name = "bfin-uart", + .owner = THIS_MODULE, }, }; @@ -1301,3 +1302,4 @@ MODULE_AUTHOR("Aubrey.Li "); MODULE_DESCRIPTION("Blackfin generic serial port driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS_CHARDEV_MAJOR(BFIN_SERIAL_MAJOR); +MODULE_ALIAS("platform:bfin-uart"); diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 56af1f566a4..16ba9ac7a56 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c @@ -1090,6 +1090,7 @@ static struct platform_driver serial_imx_driver = { .resume = serial_imx_resume, .driver = { .name = "imx-uart", + .owner = THIS_MODULE, }, }; @@ -1124,3 +1125,4 @@ module_exit(imx_serial_exit); MODULE_AUTHOR("Sascha Hauer"); MODULE_DESCRIPTION("IMX generic serial port driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:imx-uart"); diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c index e76fc72c9b3..7e164e0cd21 100644 --- a/drivers/serial/mcf.c +++ b/drivers/serial/mcf.c @@ -649,5 +649,6 @@ module_exit(mcf_exit); MODULE_AUTHOR("Greg Ungerer "); MODULE_DESCRIPTION("Freescale ColdFire UART driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:mcfuart"); /****************************************************************************/ diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index a638f23c6c6..d93b3578c5e 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -1188,6 +1188,8 @@ mpc52xx_uart_resume(struct platform_device *dev) } #endif +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:mpc52xx-psc"); static struct platform_driver mpc52xx_uart_platform_driver = { .probe = mpc52xx_uart_probe, diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index cb3a9196774..e8819c43f57 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c @@ -1964,6 +1964,7 @@ static struct platform_driver mpsc_driver = { .remove = mpsc_drv_remove, .driver = { .name = MPSC_CTLR_NAME, + .owner = THIS_MODULE, }, }; @@ -2007,3 +2008,4 @@ MODULE_DESCRIPTION("Generic Marvell MPSC serial/UART driver $Revision: 1.00 $"); MODULE_VERSION(MPSC_VERSION); MODULE_LICENSE("GPL"); MODULE_ALIAS_CHARDEV_MAJOR(MPSC_MAJOR); +MODULE_ALIAS("platform:" MPSC_CTLR_NAME); diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c index b56f7db4503..3123ffeac8a 100644 --- a/drivers/serial/netx-serial.c +++ b/drivers/serial/netx-serial.c @@ -713,6 +713,7 @@ static struct platform_driver serial_netx_driver = { .driver = { .name = DRIVER_NAME, + .owner = THIS_MODULE, }, }; @@ -745,3 +746,4 @@ module_exit(netx_serial_exit); MODULE_AUTHOR("Sascha Hauer"); MODULE_DESCRIPTION("NetX serial port driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" DRIVER_NAME); diff --git a/drivers/serial/pnx8xxx_uart.c b/drivers/serial/pnx8xxx_uart.c index 8d01c59e8d0..d0e5a79ea63 100644 --- a/drivers/serial/pnx8xxx_uart.c +++ b/drivers/serial/pnx8xxx_uart.c @@ -850,3 +850,4 @@ MODULE_AUTHOR("Embedded Alley Solutions, Inc."); MODULE_DESCRIPTION("PNX8XXX SoCs serial port driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_PNX8XXX_MAJOR); +MODULE_ALIAS("platform:pnx8xxx-uart"); diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 352fcb8926a..b4f7ffb7688 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c @@ -833,6 +833,7 @@ static struct platform_driver serial_pxa_driver = { .resume = serial_pxa_resume, .driver = { .name = "pxa2xx-uart", + .owner = THIS_MODULE, }, }; @@ -861,4 +862,4 @@ module_init(serial_pxa_init); module_exit(serial_pxa_exit); MODULE_LICENSE("GPL"); - +MODULE_ALIAS("platform:pxa2xx-uart"); diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 45de1936603..4ffa2585429 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c @@ -1935,3 +1935,7 @@ console_initcall(s3c24xx_serial_initconsole); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ben Dooks "); MODULE_DESCRIPTION("Samsung S3C2410/S3C2440/S3C2412 Serial port driver"); +MODULE_ALIAS("platform:s3c2400-uart"); +MODULE_ALIAS("platform:s3c2410-uart"); +MODULE_ALIAS("platform:s3c2412-uart"); +MODULE_ALIAS("platform:s3c2440-uart"); diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c index 58a83c27e14..67b2338913c 100644 --- a/drivers/serial/sa1100.c +++ b/drivers/serial/sa1100.c @@ -884,6 +884,7 @@ static struct platform_driver sa11x0_serial_driver = { .resume = sa1100_serial_resume, .driver = { .name = "sa11x0-uart", + .owner = THIS_MODULE, }, }; @@ -917,3 +918,4 @@ MODULE_AUTHOR("Deep Blue Solutions Ltd"); MODULE_DESCRIPTION("SA1100 generic serial port driver $Revision: 1.50 $"); MODULE_LICENSE("GPL"); MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_SA1100_MAJOR); +MODULE_ALIAS("platform:sa11x0-uart"); diff --git a/drivers/serial/sc26xx.c b/drivers/serial/sc26xx.c index a350b6d2a18..ae2a9e2df77 100644 --- a/drivers/serial/sc26xx.c +++ b/drivers/serial/sc26xx.c @@ -732,6 +732,7 @@ static struct platform_driver sc26xx_driver = { .remove = __devexit_p(sc26xx_driver_remove), .driver = { .name = "SC26xx", + .owner = THIS_MODULE, }, }; @@ -753,3 +754,4 @@ MODULE_AUTHOR("Thomas Bogendörfer"); MODULE_DESCRIPTION("SC681/SC2692 serial driver"); MODULE_VERSION("1.0"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:SC26xx"); diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 9d244d1644e..eff593080d4 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -1552,3 +1552,4 @@ module_init(sci_init); module_exit(sci_exit); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:sh-sci"); diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c index 4e06ab6bcb6..b565d5a3749 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c @@ -561,6 +561,9 @@ static int __devexit ulite_remove(struct platform_device *pdev) return ulite_release(&pdev->dev); } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:uartlite"); + static struct platform_driver ulite_platform_driver = { .probe = ulite_probe, .remove = __devexit_p(ulite_remove), diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c index 6fd51b0022c..98ab649c1ff 100644 --- a/drivers/serial/vr41xx_siu.c +++ b/drivers/serial/vr41xx_siu.c @@ -960,3 +960,6 @@ static void __exit vr41xx_siu_exit(void) module_init(vr41xx_siu_init); module_exit(vr41xx_siu_exit); + +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:SIU"); -- cgit v1.2.3 From 4bb5eba06b4bc57e30b0f6336c9907e85c395197 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 15 Apr 2008 14:34:44 -0700 Subject: spi: spi_s3c24xx driver must init completion The s3c24xx_spi_txrx() function should initialise the completion each time before using it, otherwise we end up with the possibility of returning success before the interrupt handler has processed all the data. Signed-off-by: Ben Dooks Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spi_s3c24xx.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index e75103aac79..6f2c79da984 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c @@ -192,8 +192,11 @@ static int s3c24xx_spi_txrx(struct spi_device *spi, struct spi_transfer *t) hw->len = t->len; hw->count = 0; + init_completion(&hw->done); + /* send the first byte */ writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT); + wait_for_completion(&hw->done); return hw->count; -- cgit v1.2.3 From 50f426b55d919dd017af35bb6a08753d1f262920 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 15 Apr 2008 14:34:45 -0700 Subject: spi: spi_s3c24xx must initialize bus_num Pass the bus number we expect the S3C24XX SPI driver to attach to via the platform data. Signed-off-by: Ben Dooks Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spi_s3c24xx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 6f2c79da984..80719ef5436 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c @@ -238,6 +238,7 @@ static irqreturn_t s3c24xx_spi_irq(int irq, void *dev) static int __init s3c24xx_spi_probe(struct platform_device *pdev) { + struct s3c2410_spi_info *pdata; struct s3c24xx_spi *hw; struct spi_master *master; struct resource *res; @@ -254,10 +255,10 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev) memset(hw, 0, sizeof(struct s3c24xx_spi)); hw->master = spi_master_get(master); - hw->pdata = pdev->dev.platform_data; + hw->pdata = pdata = pdev->dev.platform_data; hw->dev = &pdev->dev; - if (hw->pdata == NULL) { + if (pdata == NULL) { dev_err(&pdev->dev, "No platform data supplied\n"); err = -ENOENT; goto err_no_pdata; @@ -333,13 +334,13 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev) /* setup any gpio we can */ - if (!hw->pdata->set_cs) { + if (!pdata->set_cs) { hw->set_cs = s3c24xx_spi_gpiocs; - s3c2410_gpio_setpin(hw->pdata->pin_cs, 1); - s3c2410_gpio_cfgpin(hw->pdata->pin_cs, S3C2410_GPIO_OUTPUT); + s3c2410_gpio_setpin(pdata->pin_cs, 1); + s3c2410_gpio_cfgpin(pdata->pin_cs, S3C2410_GPIO_OUTPUT); } else - hw->set_cs = hw->pdata->set_cs; + hw->set_cs = pdata->set_cs; /* register our spi controller */ -- cgit v1.2.3 From d1e7780638a9192f15caf590e0081bf915fdef71 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 15 Apr 2008 14:34:46 -0700 Subject: spi: spi_s3c24xx must initialize num_chipselect The SPI core now expects num_chipselect to be set correctly as due to added checks on the chip being selected before an transfer is allowed. This patch adds a num_cs field to the platform data which needs to be set correctly before adding the SPI platform device. Signed-off-by: Ben Dooks Signed-off-by: David Brownell Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spi_s3c24xx.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 80719ef5436..b7476b88819 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c @@ -267,6 +267,10 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, hw); init_completion(&hw->done); + /* setup the master state. */ + + master->num_chipselect = hw->pdata->num_cs; + /* setup the state for the bitbang driver */ hw->bitbang.master = hw->master; -- cgit v1.2.3 From f0a37e008750ead1751b7d5e89d220a260a46147 Mon Sep 17 00:00:00 2001 From: Chuck Ebbert Date: Tue, 15 Apr 2008 14:34:47 -0700 Subject: acpi: bus: check once more for an empty list after locking it List could have become empty after the unlocked check that was made earlier, so check again inside the lock. Should fix https://bugzilla.redhat.com/show_bug.cgi?id=427765 Signed-off-by: Chuck Ebbert Cc: Cc: Len Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/acpi/bus.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 5b6760e0f95..2d1955c1183 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -373,10 +373,11 @@ int acpi_bus_receive_event(struct acpi_bus_event *event) } spin_lock_irqsave(&acpi_bus_event_lock, flags); - entry = - list_entry(acpi_bus_event_list.next, struct acpi_bus_event, node); - if (entry) + if (!list_empty(&acpi_bus_event_list)) { + entry = list_entry(acpi_bus_event_list.next, + struct acpi_bus_event, node); list_del(&entry->node); + } spin_unlock_irqrestore(&acpi_bus_event_lock, flags); if (!entry) -- cgit v1.2.3 From 5f1a3f2ac4ddf966cd0555dc445c6df65709c580 Mon Sep 17 00:00:00 2001 From: Krzysztof Helt Date: Tue, 15 Apr 2008 14:34:47 -0700 Subject: acpi thermal trip points increased to 12 The THERMAL_MAX_TRIPS value is set to 10. It is too few for the Compaq AP550 machine which has 12 trip points. Signed-off-by: Krzysztof Helt Cc: Len Brown Cc: Zhang Rui Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/thermal/thermal.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/thermal/thermal.c b/drivers/thermal/thermal.c index 8b86e53ccf7..7f79bbf652d 100644 --- a/drivers/thermal/thermal.c +++ b/drivers/thermal/thermal.c @@ -196,6 +196,10 @@ static struct device_attribute trip_point_attrs[] = { __ATTR(trip_point_8_temp, 0444, trip_point_temp_show, NULL), __ATTR(trip_point_9_type, 0444, trip_point_type_show, NULL), __ATTR(trip_point_9_temp, 0444, trip_point_temp_show, NULL), + __ATTR(trip_point_10_type, 0444, trip_point_type_show, NULL), + __ATTR(trip_point_10_temp, 0444, trip_point_temp_show, NULL), + __ATTR(trip_point_11_type, 0444, trip_point_type_show, NULL), + __ATTR(trip_point_11_temp, 0444, trip_point_temp_show, NULL), }; #define TRIP_POINT_ATTR_ADD(_dev, _index, result) \ -- cgit v1.2.3 From 80d9709832390fa7e721bbf4a017da474fdc6c29 Mon Sep 17 00:00:00 2001 From: James Cameron Date: Wed, 9 Apr 2008 18:59:13 +1000 Subject: USB: Obscure Maxon BP3-USB Device Support 16d8:6280 for option driver The modem was detected, the ttyUSB{0,1,2} appeared, a call could be made, and the expected data rate was achieved. Tested for an hour or two, total of 100Mb. I shall do more testing. Signed-off-by: James Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index a396fbbdc9c..eb695b2e6d2 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -165,6 +165,8 @@ static int option_send_setup(struct usb_serial_port *port); #define QUALCOMM_VENDOR_ID 0x05C6 +#define MAXON_VENDOR_ID 0x16d8 + static struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, @@ -249,6 +251,7 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ + { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, option_ids); -- cgit v1.2.3 From a1d9bc12e06a71b01f626040dc5149b357e8f1eb Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Thu, 10 Apr 2008 10:13:32 +0200 Subject: USB: option.c: add more device IDs Add devices by AMOI and NovatelWireless. Signed-Off-By: Matthias Urlichs Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index eb695b2e6d2..01b6c681ff2 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -129,6 +129,7 @@ static int option_send_setup(struct usb_serial_port *port); #define NOVATELWIRELESS_PRODUCT_EV620 0x2100 #define NOVATELWIRELESS_PRODUCT_ES720 0x2110 #define NOVATELWIRELESS_PRODUCT_E725 0x2120 +#define NOVATELWIRELESS_PRODUCT_ES620 0x2130 #define NOVATELWIRELESS_PRODUCT_EU730 0x2400 #define NOVATELWIRELESS_PRODUCT_EU740 0x2410 #define NOVATELWIRELESS_PRODUCT_EU870D 0x2420 @@ -137,6 +138,8 @@ static int option_send_setup(struct usb_serial_port *port); #define NOVATELWIRELESS_PRODUCT_MC727 0x4100 #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 +#define NOVATELWIRELESS_PRODUCT_U727 0x5010 + /* FUTURE NOVATEL PRODUCTS */ #define NOVATELWIRELESS_PRODUCT_EVDO_1 0x6000 #define NOVATELWIRELESS_PRODUCT_HSPA_1 0x7000 @@ -163,6 +166,9 @@ static int option_send_setup(struct usb_serial_port *port); #define BANDRICH_PRODUCT_C100_1 0x1002 #define BANDRICH_PRODUCT_C100_2 0x1003 +#define AMOI_VENDOR_ID 0x1614 +#define AMOI_PRODUCT_9508 0x0800 + #define QUALCOMM_VENDOR_ID 0x05C6 #define MAXON_VENDOR_ID 0x16d8 @@ -206,6 +212,7 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, + { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, /* Novatel Merlin EX720/V740/X720 */ @@ -218,13 +225,13 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EV620) }, /* Novatel EV620/ES620 CDMA/EV-DO */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES720) }, /* Novatel ES620/ES720/U720/USB720 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E725) }, /* Novatel E725/E726 */ - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES620) }, /* Novatel Merlin ES620 SM Bus */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU730) }, /* Novatel EU730 and Vodafone EU740 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU740) }, /* Novatel non-Vodafone EU740 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x5010) }, /* Novatel U727 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel U727 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_1) }, /* Novatel EVDO product */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_1) }, /* Novatel HSPA product */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_1) }, /* Novatel Embedded product */ -- cgit v1.2.3 From aad8a278f37e748bfe310a1366f2aa7e0dbaf365 Mon Sep 17 00:00:00 2001 From: fangxiaozhi Date: Thu, 10 Apr 2008 14:51:06 +0800 Subject: USB: support more Huawei data card product IDs - declare the unusal device for Huawei data card devices in unusual_devs.h - disable the product ID matching for Huawei data card devices in usb_match_device function of driver.c - declare the product IDs in option.c. Signed-off-by: fangxiaozhi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 32 +++++++++++++ drivers/usb/storage/unusual_devs.h | 96 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 124 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 01b6c681ff2..d5306ea55b3 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -109,6 +109,22 @@ static int option_send_setup(struct usb_serial_port *port); #define HUAWEI_PRODUCT_E600 0x1001 #define HUAWEI_PRODUCT_E220 0x1003 #define HUAWEI_PRODUCT_E220BIS 0x1004 +#define HUAWEI_PRODUCT_E1401 0x1401 +#define HUAWEI_PRODUCT_E1403 0x1403 +#define HUAWEI_PRODUCT_E1405 0x1405 +#define HUAWEI_PRODUCT_E1406 0x1406 +#define HUAWEI_PRODUCT_E1408 0x1408 +#define HUAWEI_PRODUCT_E1409 0x1409 +#define HUAWEI_PRODUCT_E1410 0x1410 +#define HUAWEI_PRODUCT_E1411 0x1411 +#define HUAWEI_PRODUCT_E1412 0x1412 +#define HUAWEI_PRODUCT_E1413 0x1413 +#define HUAWEI_PRODUCT_E1414 0x1414 +#define HUAWEI_PRODUCT_E1415 0x1415 +#define HUAWEI_PRODUCT_E1416 0x1416 +#define HUAWEI_PRODUCT_E1417 0x1417 +#define HUAWEI_PRODUCT_E1418 0x1418 +#define HUAWEI_PRODUCT_E1419 0x1419 #define NOVATELWIRELESS_VENDOR_ID 0x1410 @@ -212,6 +228,22 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419) }, { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index e5219a56947..91252075e6e 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -1530,16 +1530,104 @@ UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x0100, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), -/* Reported by fangxiaozhi - * and by linlei - * Patch reworked by Johann Wilhelm - * This brings the HUAWEI E220 devices into multi-port mode +/* Reported by fangxiaozhi + * This brings the HUAWEI data card devices into multi-port mode */ +UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, 0), +UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), +UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000, + "HUAWEI MOBILE", + "Mass Storage", + US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + 0), /* Reported by Vilius Bilinkevicius Date: Mon, 14 Apr 2008 10:06:35 +0800 Subject: USB: option: Add new vendor ID and device ID for AMOI HSDPA modem This patch add new vendor ID and device ID for AMOI HSDPA modem. From: tang kai Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index d5306ea55b3..d101025a4c6 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -166,6 +166,12 @@ static int option_send_setup(struct usb_serial_port *port); #define NOVATELWIRELESS_PRODUCT_EMBEDDED_2 0x8001 #define NOVATELWIRELESS_PRODUCT_GLOBAL_2 0x9001 +/* AMOI PRODUCTS */ +#define AMOI_VENDOR_ID 0x1614 +#define AMOI_PRODUCT_H01 0x0800 +#define AMOI_PRODUCT_H01A 0x7002 +#define AMOI_PRODUCT_H02 0x0802 + #define DELL_VENDOR_ID 0x413C #define KYOCERA_VENDOR_ID 0x0c88 @@ -273,6 +279,10 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_2) }, /* Novatel Embedded product */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_2) }, /* Novatel Global product */ + { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, + { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, + { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H02) }, + { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ -- cgit v1.2.3 From 07c3b1a1001614442c665570942a3107a722c314 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 14 Apr 2008 14:17:29 -0700 Subject: USB: remove broken usb-serial num_endpoints check The num_interrupt_in, num_bulk_in, and other checks in the usb-serial code are just wrong, there are too many different devices out there with different numbers of endpoints. We need to just be sticking with the device ids instead of trying to catch this kind of thing. It broke too many different devices. This fixes a large number of usb-serial devices to get them working properly again. Cc: Oliver Neukum Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/usb-serial.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 3ce98e8d7bc..2138ba8aeb6 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -854,6 +854,7 @@ int usb_serial_probe(struct usb_interface *interface, serial->num_interrupt_in = num_interrupt_in; serial->num_interrupt_out = num_interrupt_out; +#if 0 /* check that the device meets the driver's requirements */ if ((type->num_interrupt_in != NUM_DONT_CARE && type->num_interrupt_in != num_interrupt_in) @@ -867,6 +868,7 @@ int usb_serial_probe(struct usb_interface *interface, kfree(serial); return -EIO; } +#endif /* found all that we need */ dev_info(&interface->dev, "%s converter detected\n", -- cgit v1.2.3 From 09a77441f27f51f5f9878c90c7ed67e303197a2a Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Thu, 17 Apr 2008 01:14:33 +0200 Subject: Au1200: kill IDE driver function prototypes Fix these warnings emitted when compiling drivers/ide/mips/au1xxx-ide.c: include/asm/mach-au1x00/au1xxx_ide.h:137: warning: 'auide_tune_drive' declared `static' but never defined include/asm/mach-au1x00/au1xxx_ide.h:138: warning: 'auide_tune_chipset' declared `static' but never defined by wiping out the whole "function prototyping" section from the header file as it mostly declared functions that are already dead in the IDE driver; move the only useful prototype into the driver. Signed-off-by: Sergei Shtylyov Cc: Ralf Baechle Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/mips/au1xxx-ide.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 0f4bf5d7283..da91060c320 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c @@ -56,6 +56,8 @@ static _auide_hwif auide_hwif; static int dbdma_init_done; +static int auide_ddma_init(_auide_hwif *auide); + #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA) void auide_insw(unsigned long port, void *addr, u32 count) -- cgit v1.2.3 From fabd3a223a96de1a91b2148655f2ed09ca9d1c20 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Thu, 17 Apr 2008 01:14:33 +0200 Subject: Au1200: IDE driver build fix The driver fails to compile with CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA enabled: drivers/ide/mips/au1xxx-ide.c: In function `auide_build_dmatable': drivers/ide/mips/au1xxx-ide.c:256: error: implicit declaration of function `sg_virt' drivers/ide/mips/au1xxx-ide.c:275: error: implicit declaration of function `sg_next' drivers/ide/mips/au1xxx-ide.c:275: warning: assignment makes pointer from integer without a cast Fix this by including . While at it, remove the #include's without which the driver happily builds. Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/mips/au1xxx-ide.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index da91060c320..f84411b6609 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c @@ -32,19 +32,12 @@ #include #include #include - #include #include -#include - -#include +#include -#include "ide-timing.h" - -#include #include #include - #include #define DRV_NAME "au1200-ide" -- cgit v1.2.3 From b4dcaea36b0376456c97698deba0089d2d67cbe7 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Thu, 17 Apr 2008 01:14:33 +0200 Subject: Pb1200/DBAu1200: fix bad IDE resource size The header files for the Pb1200/DBAu1200 boards have wrong definition for the IDE interface's decoded range length -- it should be 512 bytes according to what the IDE driver does. In addition, the IDE platform device claims 1 byte too many for its memory resource -- fix the platform code and the IDE driver in accordance. Signed-off-by: Sergei Shtylyov Cc: Ralf Baechle Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/mips/au1xxx-ide.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index f84411b6609..85c016bdfd3 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c @@ -586,13 +586,14 @@ static int au_ide_probe(struct device *dev) goto out; } - if (!request_mem_region (res->start, res->end-res->start, pdev->name)) { + if (!request_mem_region(res->start, res->end - res->start + 1, + pdev->name)) { pr_debug("%s: request_mem_region failed\n", DRV_NAME); ret = -EBUSY; goto out; } - ahwif->regbase = (u32)ioremap(res->start, res->end-res->start); + ahwif->regbase = (u32)ioremap(res->start, res->end - res->start + 1); if (ahwif->regbase == 0) { ret = -ENOMEM; goto out; @@ -677,7 +678,7 @@ static int au_ide_remove(struct device *dev) iounmap((void *)ahwif->regbase); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - release_mem_region(res->start, res->end - res->start); + release_mem_region(res->start, res->end - res->start + 1); return 0; } -- cgit v1.2.3 From da19566552315389370c40e690054a31b7623de5 Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Thu, 17 Apr 2008 01:14:33 +0200 Subject: it821x: do not describe noraid parameter with its value Describe noraid parameter with its name (and not its value). Signed-off-by: Paul Bolle Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/pci/it821x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index 1597f0cc1bf..d8a167451fd 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c @@ -667,7 +667,7 @@ static int __init it821x_ide_init(void) module_init(it821x_ide_init); module_param_named(noraid, it8212_noraid, int, S_IRUGO); -MODULE_PARM_DESC(it8212_noraid, "Force card into bypass mode"); +MODULE_PARM_DESC(noraid, "Force card into bypass mode"); MODULE_AUTHOR("Alan Cox"); MODULE_DESCRIPTION("PCI driver module for the ITE 821x"); -- cgit v1.2.3