Re: bin/160979: 9.0 burncd error caused by change to cd0 from acd0

From: Craig Rodrigues <rodrigc_at_crodrigues.org>
Date: Mon, 26 Sep 2011 19:07:59 -0700
On Mon, Sep 26, 2011 at 6:58 PM, Doug Barton <dougb_at_freebsd.org> wrote:
>>
>> I have used burncd on many releases of FreeBSD, on many machines
>> without problem.  I can see the fact that burncd suddenly failing to
>> work on ATAPI hardware could annoy and confused end-users.
>
> It doesn't fail to work on ATAPI hardware. It fails to work on cd0 which
> is a SCSI device. The fact that it's emulated doesn't matter.

True, but the subtlety of that distinction will be lost on a lot of end-users
not familiar with the implementation of the FreeBSD storage implementation.
To them "burncd just doesn't work, when it used to".


>> Can we modify burncd to somehow detect if ATAPI-CAM is enabled, and print out
>> a more useful error message?
>
> Sure, as soon as someone volunteers to create that patch. No one is
> *trying* to annoy users, but things change around here because people
> are interested in changing them.


I am not familiar enough with the ATA_CAM work.  Is there a a sysctl or ioctl
that can be queried from userspace to detect if ATA_CAM is configured
in the kernel?

I would suggest something like:

flag = query for hw.ata.ata_cam_enabled sysctl;

if (flag == 1) {
        printf("ERROR: ATA_CAM enabled, etc., etc.)
        exit(1);
}


I only see these sysctls on a system with ATA_CAM enabled:

hw.ata.setmax: 0
hw.ata.wc: 1
hw.ata.atapi_dma: 1
hw.ata.ata_dma_check_80pin: 1
hw.ata.ata_dma: 1
dev.atapci.0.%desc: Intel ATA controller
dev.atapci.0.%driver: atapci
dev.atapci.0.%location: slot=3 function=2
dev.atapci.0.%pnpinfo: vendor=0x8086 device=0x29b6 subvendor=0x1028
subdevice=0x0211 class=0x010185
dev.atapci.0.%parent: pci0
dev.ata.2.%desc: ATA channel 0
dev.ata.2.%driver: ata
dev.ata.2.%location: channel=0
dev.ata.2.%parent: atapci0
dev.ata.3.%desc: ATA channel 1
dev.ata.3.%driver: ata
dev.ata.3.%location: channel=1
dev.ata.3.%parent: atapci0
dev.ata.0.%driver: ata
dev.ata.0.%parent: isa0
dev.ata.1.%driver: ata
dev.ata.1.%parent: isa0

-- 
Craig Rodrigues
rodrigc_at_crodrigues.org
Received on Tue Sep 27 2011 - 00:08:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:18 UTC