From: Linus Torvalds Date: Sat, 23 Oct 2010 03:30:48 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 X-Git-Tag: v2.6.37-rc1~154 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=5cc103506289de7ee0a0b526ae0381541990cad4 Merge git://git./linux/kernel/git/gregkh/usb-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (141 commits) USB: mct_u232: fix broken close USB: gadget: amd5536udc.c: fix error path USB: imx21-hcd - fix off by one resource size calculation usb: gadget: fix Kconfig warning usb: r8a66597-udc: Add processing when USB was removed. mxc_udc: add workaround for ENGcm09152 for i.MX35 USB: ftdi_sio: add device ids for ScienceScope USB: musb: AM35x: Workaround for fifo read issue USB: musb: add musb support for AM35x USB: AM35x: Add musb support usb: Fix linker errors with CONFIG_PM=n USB: ohci-sh - use resource_size instead of defining its own resource_len macro USB: isp1362-hcd - use resource_size instead of defining its own resource_len macro USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro USB: xhci: Fix compile error when CONFIG_PM=n USB: accept some invalid ep0-maxpacket values USB: xHCI: PCI power management implementation USB: xHCI: bus power management implementation USB: xHCI: port remote wakeup implementation USB: xHCI: port power management implementation ... Manually fix up (non-data) conflict: the SCSI merge gad renamed the 'hw_sector_size' member to 'physical_block_size', and the USB tree brought a new use of it. --- 5cc103506289de7ee0a0b526ae0381541990cad4 diff --cc drivers/scsi/sd.c index 20295774bf70,ff4c9a3aa5b2..57d1e3e1bd44 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@@ -1626,6 -1629,15 +1629,15 @@@ static int read_capacity_10(struct scsi sector_size = get_unaligned_be32(&buffer[4]); lba = get_unaligned_be32(&buffer[0]); + if (sdp->no_read_capacity_16 && (lba == 0xffffffff)) { + /* Some buggy (usb cardreader) devices return an lba of + 0xffffffff when the want to report a size of 0 (with + which they really mean no media is present) */ + sdkp->capacity = 0; - sdkp->hw_sector_size = sector_size; ++ sdkp->physical_block_size = sector_size; + return sector_size; + } + if ((sizeof(sdkp->capacity) == 4) && (lba == 0xffffffff)) { sd_printk(KERN_ERR, sdkp, "Too big for this kernel. Use a " "kernel compiled with support for large block "