From owner-freebsd-bugs@FreeBSD.ORG Thu Apr 12 16:10:03 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CD0516A402 for ; Thu, 12 Apr 2007 16:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 7743413C465 for ; Thu, 12 Apr 2007 16:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3CGA3GZ089516 for ; Thu, 12 Apr 2007 16:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3CGA3FA089514; Thu, 12 Apr 2007 16:10:03 GMT (envelope-from gnats) Resent-Date: Thu, 12 Apr 2007 16:10:03 GMT Resent-Message-Id: <200704121610.l3CGA3FA089514@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Thomas Nyström Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7081B16A402 for ; Thu, 12 Apr 2007 16:02:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 5D63713C458 for ; Thu, 12 Apr 2007 16:02:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l3CG25HD091733 for ; Thu, 12 Apr 2007 16:02:05 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l3CFv3M3084825; Thu, 12 Apr 2007 15:57:03 GMT (envelope-from nobody) Message-Id: <200704121557.l3CFv3M3084825@www.freebsd.org> Date: Thu, 12 Apr 2007 15:57:03 GMT From: Thomas Nyström To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: kern/111516: Unsupported Compact Flash (Viking 256MB) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2007 16:10:03 -0000 >Number: 111516 >Category: kern >Synopsis: Unsupported Compact Flash (Viking 256MB) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 12 16:10:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Thomas Nyström >Release: 6.2-RELEASE >Organization: Svensk Aktuell Elektronik AB >Environment: FreeBSD ture.saeab.se 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Tue Jan 16 17:58:45 CET 2007 root@ture.saeab.se:/export2/obj/usr/src/sys/FIREWALL.SAE i386 >Description: Some variants of the Viking Interworks 256MB Compact Flash cards doesn't work, it is not recognized as a disk. The disc-controller is detected but no disk. The problem variant returns the code 0x8400 in the configuration word. FreeBSD looks for the magic words 0x844a or 0x848a (in sys/dev/ata/ata-disk.c, function ad_probe). The attached patch also looks for the 0x8400 magic word. >How-To-Repeat: >Fix: Patch attached with submission follows: --- ata-all.h.orig Thu Apr 12 17:49:43 2007 +++ ata-all.h Thu Apr 12 17:51:41 2007 @@ -271,6 +271,7 @@ #define ATA_DEV(device) ((device == ATA_MASTER) ? 0 : 1) #define ATA_CFA_MAGIC1 0x844A #define ATA_CFA_MAGIC2 0x848A +#define ATA_CFA_MAGIC3 0x8400 #define ATAPI_MAGIC_LSB 0x14 #define ATAPI_MAGIC_MSB 0xeb #define ATAPI_P_READ (ATA_S_DRQ | ATA_I_IN) --- ata-disk.c.orig Sat Sep 30 16:51:49 2006 +++ ata-disk.c Thu Apr 12 17:51:49 2007 @@ -72,7 +72,8 @@ if (!(atadev->param.config & ATA_PROTO_ATAPI) || (atadev->param.config == ATA_CFA_MAGIC1) || - (atadev->param.config == ATA_CFA_MAGIC2)) + (atadev->param.config == ATA_CFA_MAGIC2) || + (atadev->param.config == ATA_CFA_MAGIC3)) return 0; else return ENXIO; >Release-Note: >Audit-Trail: >Unformatted: