From owner-freebsd-usb@FreeBSD.ORG Sun Apr 20 10:54:46 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 674DAF5F for ; Sun, 20 Apr 2014 10:54:46 +0000 (UTC) Received: from mail-yk0-f176.google.com (mail-yk0-f176.google.com [209.85.160.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29DD21322 for ; Sun, 20 Apr 2014 10:54:45 +0000 (UTC) Received: by mail-yk0-f176.google.com with SMTP id 19so2632499ykq.35 for ; Sun, 20 Apr 2014 03:54:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=3lvgD/1iERwEa+MpofZdC3E8/AwArEpEaBPQUI8gJcE=; b=Hw5o1ijNR6xGnxVk2Wbkf0r4JRKDkQj9M+jXA4/BPfJLFqVbhCM7AfWXAYq9u53F69 IKGP/+wK36C0Te+nk/bEtAxMF8A60it//yRBlWhW18zVsdYeU/M45UY462hrQqz11g/7 KrnJlmPce922qNTy+xYIWxWzBOOotWnOKSq6TLs2r+AhmoDotlMBmz0Wa06Nnsz1pOTn 3Izvx3GDOxLYUKpyowye3+yYty611aFuCOJ4WLrfc7ViaTcnkw9cEZqK0lnZ7LqQGIcK 7twrxEQWGkimud3OqtNMQKcpqukPc1bziHzbT4mUGbHVdANBEsijQGYaL1VsNS2mXPD8 6Fqg== X-Gm-Message-State: ALoCoQn0zrKTSpc3+Xg3CV3unKKunoRbZBxLvrX7eBN8kspTqD9a635EYbH50Y107R/HzVHtpp43 MIME-Version: 1.0 X-Received: by 10.236.142.204 with SMTP id i52mr43579978yhj.6.1397991278868; Sun, 20 Apr 2014 03:54:38 -0700 (PDT) Received: by 10.170.159.212 with HTTP; Sun, 20 Apr 2014 03:54:38 -0700 (PDT) X-Originating-IP: [67.10.123.128] Date: Sun, 20 Apr 2014 05:54:38 -0500 Message-ID: Subject: LBA Error on 128GB Flash Drive From: Wes Morgan To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 10:54:46 -0000 I've got an ADATA 128gb USB3 flash drive ( http://www.newegg.com/Product/Product.aspx?Item=N82E16820211819) that is giving me LBA errors. It appears that the drive is being mis-identified and reporting the wrong number of sectors. Camcontrol says the last block is 246960127, which I believe to be correct because any attempt to write to a block after that fails. However, the kernel thinks that the device has 247484416 sectors and pretty much everything fails to use the device properly because partition tables and filesystems like to store things at the end of devices. This is the second one of these I've had and both have the same error. My laptop is fairly old and USB2 only, but I've got some newer machines with USB3 ports and they have the same problem. Attaching the drive to a Linux machine reports the correct number of blocks. All my FreeBSD machines are running 10-stable. Camcontrol output: [morganw@mercury:~$]: camcontrol readcap da0 Last Block: 246960127, Block Length: 512 bytes dmesg output: ugen0.5: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0x0100 umass0:4:0:-1: Attached to scbus4 da0 at umass-sim0 bus 0 scbus4 target 0 lun 0 da0: Removable Direct Access SCSI-6 device da0: Serial Number 1411216542340002 da0: 40.000MB/s transfers da0: 120842MB (247484416 512 byte sectors: 255H 63S/T 15405C) da0: quirks=0x2 (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 0e c0 4f ff 00 00 01 00 (da0:umass-sim0:0:0:0): CAM status: SCSI Status Error (da0:umass-sim0:0:0:0): SCSI status: Check Condition (da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range) (da0:umass-sim0:0:0:0): Error 22, Unretryable error (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 0e c0 4f ff 00 00 01 00 (da0:umass-sim0:0:0:0): CAM status: SCSI Status Error (da0:umass-sim0:0:0:0): SCSI status: Check Condition (da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range) (da0:umass-sim0:0:0:0): Error 22, Unretryable error (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 0e c0 4f ff 00 00 01 00 (da0:umass-sim0:0:0:0): CAM status: SCSI Status Error (da0:umass-sim0:0:0:0): SCSI status: Check Condition (da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range) (da0:umass-sim0:0:0:0): Error 22, Unretryable error Linux output: [662425.835482] usb 4-4: new SuperSpeed USB device number 2 using xhci_hcd [662425.851796] usb 4-4: New USB device found, idVendor=125f, idProduct=de7a [662425.851802] usb 4-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [662425.851814] usb 4-4: Product: ADATA USB Flash Drive [662425.851815] usb 4-4: Manufacturer: ADATA [662425.851816] usb 4-4: SerialNumber: 1411216542340002 [662425.857974] usb-storage 4-4:1.0: USB Mass Storage device detected [662425.858093] scsi6 : usb-storage 4-4:1.0 [662425.858723] usbcore: registered new interface driver usb-storage [662426.856074] scsi 6:0:0:0: Direct-Access ADATA USB Flash Drive 1.00 PQ: 0 ANSI: 6 [662426.856267] sd 6:0:0:0: Attached scsi generic sg1 type 0 [662426.856513] sd 6:0:0:0: [sdb] 246960128 512-byte logical blocks: (126 GB/117 GiB) [662426.857069] sd 6:0:0:0: [sdb] Write Protect is off [662426.857073] sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00 [662426.857543] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA [662426.860162] sdb: sdb1 [662426.860889] sd 6:0:0:0: [sdb] Attached SCSI removable disk