atapicam causes fatal kernel trap

Andrew Gallatin gallatin at cs.duke.edu
Mon Sep 8 14:06:45 PDT 2003


Idar Tollefsen writes:
 > Andrew Gallatin wrote:
 > > (gdb) list *atapi_action+0x194
 > 
 > 0xfffffc000036b974 is in atapi_action (../../dev/ata/atapi-cam.c:256).
 > 251             strncpy(cpi->hba_vid, "ATAPI", sizeof(cpi->hba_vid));
 > 252             strncpy(cpi->dev_name, cam_sim_name(sim), sizeof
 > cpi->dev_name);
 > 253             cpi->unit_number = cam_sim_unit(sim);
 > 254             cpi->bus_id = cam_sim_bus(sim);
 > 255             if (softc->ata_ch && ccb_h->target_id >= 0) {


My suggestion, knowing nothing about the ataipcam code, would be to
add a line just after the "if", which says:

    printf("ccb_h->target_id = %d\n", ccb_h->target_id);

Hmmm..  Thomas, how can  ccb_h->target_id ever be less than 0 if
a target_id_t is typedef'ed to a u_int?   Perhaps the test should be

    if (softc->ata_ch && ccb_h->target_id != CAM_TARGET_WILDCARD) {


Drew


More information about the freebsd-alpha mailing list