Asterisk Env
AsteriskEnv 2009 ³â 8 ¿ù ¶* iptime
# now check the real state is_available ${REALDEVICE} || { if [ -n "$alias" ]; then echo $"$alias device ${DEVICE} does not seem to be present, delaying initialization." else echo $"Device ${DEVICE} does not seem to be present, delaying initialization." fi exit 1 } * iptime compile
[c5-media] name=CentOS-$releasever - Media baseurl=file:///mnt/sda7/CentOS5.3/CentOS/ gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 * yum -y groupinstall "X Window System"
* change /etc/inittab
637 rpm -ivh glibc-common-2.5-18.el5_1.1.i386.rpm 638 rpm -ivh --force glibc-common-2.5-18.el5_1.1.i386.rpm 639 rpm -ivh --force glibc-2.5-18.el5_1.1.i686.rpm 640 rpm -ivh --force hal-0.5.8.1-25.el5_1.1.i386.rpm 641 rpm -ivh --force dbus-1.0.0-6.3.el5_1.i386.rpm 2009 ³â 9 ¿ù 4ÀÏ ¶* AsteriskNOW 1.5.0 ¼³Ä¡
* grub
This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO. Centos 5.3 iptime ¶Dell server ¶
# P A R T I T I O N S P E C I F I C A T I O N # # This is where you specify the partitions to be used in the install. # There are several sections that we'll cover in order. # # If you are doing a kickstart install on a new drive, the partition table # will likely corrupt. The zerombr command can be used to clear the # partition table if it is corrupt; otherwise it will take no action. In # order to clear the partition table, follow the zerombr command with # "yes"; if followed by "no", no action will be taken. # # Example: #zerombr yes # # The clearpart command is used to control which partitions are to be wiped # from all drives. Follow the clearpart command with "--all" to remove all # partitions from all drives, or "--linux" to remove all Linux-related # partitions (ie., partitions of type "Linux native" and "Linux swap") from # all drives. # # Example: #clearpart --linux # # Next, specify the partitions that you'd like to create. Partitions are # only created from free space available on the system. Enter one # partition per line using the following format: # # part <mntpt> --size <size in megs> [--grow] [--maxsize <size in megs>] # # Where <mntpt> is the desired mount point for the partition (or "swap" for # swap partitions). Add "--grow" to create a partition that will grow to # fill all remaining space on the drive. To limit the affect of --grow, # you can add "--maxsize" followed by a size specification. # # Examples: #part / --size 250 #part swap --size 32 #part /usr --size 500 --grow --maxsize 800 #part /tmp --size 100 --grow Dell system 4700 ¶
2008. 07. 11 for install centos 5.1 ¶
ata1.00: qc timeout (cmd 0xec) ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40) ata1.00 revalidation failed (errno = -5) ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (78242976) ata1.01: failed to set xfermode (err_mask=0x40) ata1: failed to recover some devices, retrying in 5 secs Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx ICH6: IDE controller at PCI slot 0000:00:1f.1 ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 11 (level, low) -> IRQ 11 ICH6: chipset revision 3 ICH6: not 100% native mode: will probe irqs later ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio Probing IDE interface ide0... hda: HL-DT-ST DVDRAM GSA-4160B, ATAPI CD/DVD-ROM drive Using cfq io scheduler ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 Probing IDE interface ide1... Probing IDE interface ide2... Probing IDE interface ide3... Probing IDE interface ide4... Probing IDE interface ide5... hda: ATAPI 40X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache, UDMA(33) Uniform CD-ROM driver Revision: 3.20 SCSI subsystem initialized libata version 1.11 loaded. ata_piix version 1.03 ACPI: PCI interrupt 0000:00:1f.2[C] -> GSI 9 (level, low) -> IRQ 9 PCI: Setting latency timer of device 0000:00:1f.2 to 64 ata1: SATA max UDMA/133 cmd 0xFE00 ctl 0xFE12 bmdma 0xFEA0 irq 9 ata2: SATA max UDMA/133 cmd 0xFE20 ctl 0xFE32 bmdma 0xFEA8 irq 9 ata1: dev 0 cfg 49:2f00 82:346b 83:7f01 84:4003 85:3469 86:3c01 87:4003 88:207f ata1: dev 0 ATA, max UDMA/133, 312500000 sectors: lba48 ata1: dev 1 cfg 49:0b00 82:346b 83:5301 84:4003 85:3469 86:1001 87:4003 88:203f ata1: dev 1 ATA, max UDMA/100, 78242976 sectors: ata1: dev 0 configured for UDMA/100 ata1: dev 1 configured for UDMA/100 scsi0 : ata_piix ATA: abnormal status 0xFF on port 0xFE27 ata2: disabling port scsi1 : ata_piix Vendor: ATA Model: ST3160023AS Rev: 8.12 Type: Direct-Access ANSI SCSI revision: 05 SCSI device sda: 312500000 512-byte hdwr sectors (160000 MB) SCSI device sda: drive cache: write back sda: sda1 sda2 sda3 < sda5 sda6 sda7 sda8 sda9 sda10 > sda4 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 Vendor: ATA Model: SAMSUNG SV4012H Rev: RM10 Type: Direct-Access ANSI SCSI revision: 05 SCSI device sdb: 78242976 512-byte hdwr sectors (40060 MB) SCSI device sdb: drive cache: write back sdb: sdb1 sdb2 Attached scsi disk sdb at scsi0, channel 0, id 1, lun 0 kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode.
sda: Write Protect is off sda: Mode Sense: 00 3a 00 00 ata1: soft resetting port ata1.00: configured for UDMA/133 ata1.01: configured for UDMA/66 ata1: EH complete ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 ata1.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x25 data 8 in res 00/24:03:00:00:00/00:00:00:00:00/a0 Emask 0x2 (timeout) sd 0:0:0:0: SCSI error: return code = 0x8000002 sdb: Current [descriptor]: sense key: Aborted Command end_request: I/O error, dev sdb, sector 0 Buffer I/O error on device sdb, logical block 0
SCSI subsystem initialized libata version 1.11 loaded. ata_piix version 1.03 ACPI: PCI interrupt 0000:00:1f.2[C] -> GSI 9 (level, low) -> IRQ 9 PCI: Setting latency timer of device 0000:00:1f.2 to 64 ata1: SATA max UDMA/133 cmd 0xFE00 ctl 0xFE12 bmdma 0xFEA0 irq 9 ata2: SATA max UDMA/133 cmd 0xFE20 ctl 0xFE32 bmdma 0xFEA8 irq 9 ata1: dev 0 cfg 49:2f00 82:346b 83:7f01 84:4003 85:3469 86:3c01 87:4003 88:207f ata1: dev 0 ATA, max UDMA/133, 312500000 sectors: lba48 ata1: dev 0 configured for UDMA/133 scsi0 : ata_piix ATA: abnormal status 0xFF on port 0xFE27 ata2: disabling port scsi1 : ata_piix Vendor: ATA Model: ST3160023AS Rev: 8.12 Type: Direct-Access ANSI SCSI revision: 05 SCSI device sda: 312500000 512-byte hdwr sectors (160000 MB) SCSI device sda: drive cache: write back sda: sda1 sda2 sda3 < sda5 sda6 sda7 sda8 sda9 sda10 > sda4 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode.
SCSI subsystem initialized libata version 2.21 loaded. ata_piix 0000:00:1f.2: version 2.11 ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ] ACPI: PCI Interrupt 0000:00:1f.2[C] -> GSI 20 (level, low) -> IRQ 233 PCI: Setting latency timer of device 0000:00:1f.2 to 64 scsi0 : ata_piix scsi1 : ata_piix ata1: SATA max UDMA/133 cmd 0x0001fe00 ctl 0x0001fe12 bmdma 0x0001fea0 irq 233 ata2: SATA max UDMA/133 cmd 0x0001fe20 ctl 0x0001fe32 bmdma 0x0001fea8 irq 233 ata1.00: ATA-6: ST3160023AS, 8.12, max UDMA/133 ata1.00: 312500000 sectors, multi 8: LBA48 NCQ (depth 0/32) ata1.00: configured for UDMA/133 usb 1-1: configuration #1 chosen from 1 choice Vendor: ATA Model: ST3160023AS Rev: 8.12 Type: Direct-Access ANSI SCSI revision: 05 SCSI device sda: 312500000 512-byte hdwr sectors (160000 MB) sda: Write Protect is off sda: Mode Sense: 00 3a 00 00 SCSI device sda: drive cache: write back SCSI device sda: 312500000 512-byte hdwr sectors (160000 MB) sda: Write Protect is off sda: Mode Sense: 00 3a 00 00 SCSI device sda: drive cache: write back sda: sda1 sda2 sda3 < sda5 sda6 sda7 sda8 sda9 sda10 > sda4 sd 0:0:0:0: Attached scsi disk sda
SCSI subsystem initialized hda: ATAPI 40X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache, UDMA(33) libata version 2.21 loaded. ata_piix 0000:00:1f.2: version 2.11 ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ] scsi0 : ata_piix scsi1 : ata_piix ata1: SATA max UDMA/133 cmd 0x0001fe00 ctl 0x0001fe12 bmdma 0x0001fea0 irq 233 ata2: SATA max UDMA/133 cmd 0x0001fe20 ctl 0x0001fe32 bmdma 0x0001fea8 irq 233 ata1.00: ATA-6: ST3160023AS, 8.12, max UDMA/133 ata1.00: 312500000 sectors, multi 8: LBA48 NCQ (depth 0/32) ata1.01: qc timeout (cmd 0xf8) ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (78242976) ata1.01: ATA-6: SAMSUNG SV4012H, RM100-05, max UDMA/100 ata1.01: 78242976 sectors, multi 8: LBA ata1.01: applying bridge limits ata1.00: failed to set xfermode (err_mask=0x40) ata1: failed to recover some devices, retrying in 5 secs ata1.01: qc timeout (cmd 0xf8) ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (78242976) ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40) ata1.00: revalidation failed (errno=-5) ata1.00: limiting speed to UDMA/133:PIO3 ata1: failed to recover some devices, retrying in 5 secs ata1.01: qc timeout (cmd 0xf8) ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (78242976) ata1.00: failed to IDENTIFY (I/O error, err_mask=0x40) ata1.00: revalidation failed (errno=-5) ata1.00: disabled ata1: failed to recover some devices, retrying in 5 secs ata1.01: failed to set xfermode (err_mask=0x40) ata1: failed to recover some devices, retrying in 5 secs ata1.01: qc timeout (cmd 0xf8) ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (78242976) ata1.01: failed to set xfermode (err_mask=0x40) ata1.01: limiting speed to UDMA/100:PIO3 ata1: failed to recover some devices, retrying in 5 secs ata1.01: qc timeout (cmd 0xf8) ata1.01: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (78242976) ata1.01: failed to set xfermode (err_mask=0x40) ata1.01: disabled kernel source ¶
modules ¶
sd_mod ¶
If the device is opened for the first time and there are partitions, it calls bdget_disk to get the block device structure for the whole disk and calls blkdev_get to open the disk. The open handler of the block device operations table [ 74.683198] usb-storage: device found at 3 [ 74.685229] scsi 0:0:0:0: Direct-Access UDISK PDU01_1G 65G2.0 0.00 PQ: 0 ANSI: 2 [ 74.692196] usb-storage: device scan complete [ 75.018341] sd 0:0:0:0: [sda] 1967616 512-byte hardware sectors (1007 MB) [ 75.019465] sd 0:0:0:0: [sda] Write Protect is off [ 75.019624] sd 0:0:0:0: [sda] Mode Sense: 00 00 00 00 [ 75.019745] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 75.019872] sd_probe: call add_disk [ 75.019986] start of register_disk: 1 [ 75.020234] after device_add: 3 [ 75.020387] after disk_sysfs_add_subdirs: 5 [ 75.020519] after get_capacity: 5 [ 75.020672] after bdget_disk: 5 [ 75.023582] sd 0:0:0:0: [sda] 1967616 512-byte hardware sectors (1007 MB) [ 75.024637] sd 0:0:0:0: [sda] Write Protect is off [ 75.024905] sd 0:0:0:0: [sda] Mode Sense: 00 00 00 00 [ 75.025115] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 75.025264] sda: sda1 [ 75.054655] after blkdev_get: 8 [ 75.054924] after blkdev_put: 7 [ 75.057048] end of register_disk: 7 [ 75.057628] after blk_register_queue: 9 [ 75.057871] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 75.464875] sd 0:0:0:0: Attached scsi generic sg0 type 0 ata_piix ¶
static struct pci_driver piix_pci_driver = { .name = DRV_NAME, .id_table = piix_pci_tbl, .probe = piix_init_one, .remove = ata_pci_remove_one, #ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, #endif };
printk(KERN_ERR "bus: '%s': add driver %s\n", bus->name, drv->name);
[<c02d27e8>] scsi_request_fn+0x74/0x28e [<c020fd2e>] __generic_unplug_device+0x1d/0x20 [<c0211bb4>] blk_execute_rq_nowait+0x50/0x5c [<c0211c26>] blk_execute_rq+0x66/0x83 [<c0211c43>] ? blk_end_sync_rq+0x0/0x29 [<c01151fd>] ? hide_addr+0x32/0x72 [<c0115275>] ? kmemcheck_hide+0x38/0x67 [<c0431650>] ? do_debug+0x3d/0x105 [<c04312cf>] ? debug_stack_correct+0x27/0x2c [<c02d1e51>] scsi_execute+0xc0/0xed [<c02d1ece>] scsi_execute_req+0x50/0x9d [<c02d33dd>] scsi_probe_and_add_lun+0x1a3/0x7d1 [<c0431650>] ? do_debug+0x3d/0x105 [<c0270024>] ? hwrng_register+0xc3/0x147 [<c02d465a>] __scsi_add_device+0x8a/0xb7 [<c031e52d>] ata_scsi_scan_host+0x9d/0x2c3 [<c031b577>] ata_host_register+0x21b/0x239 [<c03201b2>] ata_pci_activate_sff_host+0x17c/0x1a6 [<c031c764>] ? ata_interrupt+0x0/0x214 [<c032061c>] ata_pci_init_one+0x9b/0xef [<c032e3d7>] amd_init_one+0x171/0x179 [<c0226e82>] pci_device_probe+0x39/0x63 [<c027d966>] driver_probe_device+0xb8/0x14d [<c027dafe>] __driver_attach+0x59/0x88 [<c027ce3b>] bus_for_each_dev+0x41/0x64 [<c027d7f3>] driver_attach+0x17/0x19 [<c027daa5>] ? __driver_attach+0x0/0x88 [<c027d5db>] bus_add_driver+0xa8/0x1ed [<c027dcbb>] driver_register+0x55/0xc4 [<c0227036>] __pci_register_driver+0x2e/0x5c ata_bus_probe ¶
ata_dev_configure ¶
error ¶
solution ¶
dmesg0 ¶Driver 'sd' needs updating - please use bus_type methods Driver 'sr' needs updating - please use bus_type methods ata_piix 0000:00:1f.1: version 2.12 ata_piix 0000:00:1f.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16 ata_piix 0000:00:1f.1: setting latency timer to 64 scsi0 : ata_piix scsi1 : ata_piix ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14 ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15 ata1.00: ATAPI: HL-DT-ST DVDRAM GSA-4160B, A306, max UDMA/66 ata1.00: limited to UDMA/33 due to 40-wire cable ata1.00: configured for UDMA/33 ata2: port disabled. ignoring. scsi 0:0:0:0: CD-ROM HL-DT-ST DVDRAM GSA-4160B A306 PQ: 0 ANSI: 5 sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray Uniform CD-ROM driver Revision: 3.20 sr 0:0:0:0: Attached scsi CD-ROM sr0 sr 0:0:0:0: Attached scsi generic sg0 type 5 http://marc.info/?l=linux-scsi&m=121000463825804&w=2 Driver 'sd' needs updating - please use bus_type methods Driver 'sr' needs updating - please use bus_type methods * init_sd, init_sr: drivers/scsi/sd.c, sr.c
printk(KERN_WARNING "Driver '%s' needs updating - please use " "bus_type methods\n", drv->name); ata_piix 0000:00:1f.1: version 2.12 ata_piix 0000:00:1f.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16 ata_piix 0000:00:1f.1: setting latency timer to 64 * static int __devinit piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); dmesg1 ¶ata_piix 0000:00:1f.2: PCI INT C -> GSI 20 (level, low) -> IRQ 20 ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ] ata_piix 0000:00:1f.2: setting latency timer to 64 scsi2 : ata_piix scsi3 : ata_piix ata3: SATA max UDMA/133 cmd 0xfe00 ctl 0xfe10 bmdma 0xfea0 irq 20 ata4: SATA max UDMA/133 cmd 0xfe20 ctl 0xfe30 bmdma 0xfea8 irq 20 * piix_init_one: ata_piix.c
ata_piix 0000:00:1f.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16* rc = pcim_enable_device(pdev); drivers/pci/pci.c
return pcibios_enable_irq(dev); * pci_acpi_init(void): arch/x86/pci/acpi.c pcibios_enable_irq = acpi_pci_irq_enable;
dev_info(&dev->dev, "PCI INT %c%s -> GSI %u (%s, %s) -> IRQ %d\n", 'A' + pin, link_desc, irq, (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge", (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq); ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ] * piix_init_sata_map
dev_printk(KERN_INFO, &pdev->dev, "MAP ["); ... default: printk(" P%d", map[i]); if (i & 1) pinfo[i / 2].flags |= ATA_FLAG_SLAVE_POSS; break; ata_piix 0000:00:1f.1: setting latency timer to 64 * pci_set_master(struct pci_dev *dev) pci/pci.c
dev_printk(KERN_DEBUG, &dev->dev, "setting latency timer to %d\n", lat); scsi2 : ata_piix scsi3 : ata_piix * ata_pci_sff_activate_host: libata-sff.c
printk(KERN_INFO "scsi%d : %s\n", shost->host_no, sht->info ? sht->info(shost) : sht->name); ata3: SATA max UDMA/133 cmd 0xfe00 ctl 0xfe10 bmdma 0xfea0 irq 20 ata4: SATA max UDMA/133 cmd 0xfe20 ctl 0xfe30 bmdma 0xfea8 irq 20 * ata_piix.c ÀÇ piix_init_one ÇÔ¼ö´Â ata_pci_sff_prepare_host(pdev, ppi, &host); ¸¦ call ÇÑ´Ù.
ata_port_desc(ap, "cmd 0x%llx ctl 0x%llx", (unsigned long long)pci_resource_start(pdev, base), (unsigned long long)pci_resource_start(pdev, base + 1));
ata_port_desc(ap, "bmdma 0x%llx", (unsigned long long)pci_resource_start(pdev, 4) + 8 * i);* ata_piix.c ÀÇ piix_init_one ÇÔ¼ö´Â ata_pci_sff_activate_host(host, ata_sff_interrupt, &piix_sht); ÇÔ¼ö¸¦ call ÇÑ´Ù.
ata_port_desc(host->ports[0], "irq %d", pdev->irq);
ata_port_printk(ap, KERN_INFO, "%cATA max %s %s\n", (ap->flags & ATA_FLAG_SATA) ? 'S' : 'P', ata_mode_string(xfer_mask), ap->link.eh_info.desc);* libata.h extern void ata_port_desc(struct ata_port *ap, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); #define ata_port_printk(ap, lv, fmt, args...) \ printk("%sata%u: "fmt, lv, (ap)->print_id , ##args) dmesg2 ¶ata3.00: ATA-6: ST3160023AS, 8.12, max UDMA/133 ata3.00: 312500000 sectors, multi 8: LBA48 NCQ (depth 0/32) ata3.00: configured for UDMA/133 scsi 2:0:0:0: Direct-Access ATA ST3160023AS 8.12 PQ: 0 ANSI: 5 sd 2:0:0:0: [sda] 312500000 512-byte hardware sectors (160000 MB) sd 2:0:0:0: [sda] Write Protect is off sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 2:0:0:0: [sda] 312500000 512-byte hardware sectors (160000 MB) sd 2:0:0:0: [sda] Write Protect is off sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sda3 < sda5 sda6 sda7 sda8 sda9 sda10 > sda4 sd 2:0:0:0: [sda] Attached SCSI disk sd 2:0:0:0: Attached scsi generic sg1 type 0 * piix_init_one: ata_piix.c
/* print device info to dmesg */ if (ata_msg_drv(ap) && print_info) { ata_dev_printk(dev, KERN_INFO, "%s: %s, %s, max %s\n", revbuf, modelbuf, fwrevbuf, ata_mode_string(xfer_mask)); ata_dev_printk(dev, KERN_INFO, "%Lu sectors, multi %u: %s %s\n", (unsigned long long)dev->n_sectors, dev->multi_count, lba_desc, ncq_desc);
ata_dev_printk(dev, KERN_INFO, "configured for %s%s\n", ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)), dev_err_whine); ata_bus_probe ¶* libata-core.c
* ata_link_for_each_dev
include/linux/libata.h #define ata_link_for_each_dev(dev, link) \ for ((dev) = (link)->device; \ (dev) < (link)->device + ata_link_max_devices(link) || ((dev) = NULL); \ (dev)++) #define ata_link_for_each_dev_reverse(dev, link) \ for ((dev) = (link)->device + ata_link_max_devices(link) - 1; \ (dev) >= (link)->device || ((dev) = NULL); (dev)--) sd °ü·Ã ¶* sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer): scsi/sd.c
static void sd_print_result(struct scsi_disk *sdkp, int result) { sd_printk(KERN_INFO, sdkp, ""); scsi_show_result(result); }* scsi/constants.c #define NUM_SUGGEST_STRS ARRAY_SIZE(driversuggest_table) void scsi_show_result(int result) { int hb = host_byte(result); int db = (driver_byte(result) & DRIVER_MASK); int su = ((driver_byte(result) & SUGGEST_MASK) >> 4); printk("Result: hostbyte=%s driverbyte=%s,%s\n", (hb < NUM_HOSTBYTE_STRS ? hostbyte_table[hb] : "invalid"), (db < NUM_DRIVERBYTE_STRS ? driverbyte_table[db] : "invalid"), (su < NUM_SUGGEST_STRS ? driversuggest_table[su] : "invalid")); } #else void scsi_show_result(int result) { printk("Result: hostbyte=0x%02x driverbyte=0x%02x\n", host_byte(result), driver_byte(result)); } #endif * sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer): scsi/sd.c
/* Get sense key string or NULL if not available */ const char * scsi_sense_key_string(unsigned char key) { #ifdef CONFIG_SCSI_CONSTANTS if (key <= 0xE) return snstext[key]; #endif return NULL; } /* description of the sense key values */ static const char * const snstext[] = { "No Sense", /* 0: There is no sense information */ "Recovered Error", /* 1: The last command completed successfully but used error correction */ "Not Ready", /* 2: The addressed target is not ready */ "Medium Error", /* 3: Data error detected on the medium */ "Hardware Error", /* 4: Controller or device failure */ "Illegal Request", /* 5: Error in request */ "Unit Attention", /* 6: Removable medium was changed, or the target has been reset, or ... */ "Data Protect", /* 7: Access to the data is blocked */ "Blank Check", /* 8: Reached unexpected written or unwritten region of the medium */ "Vendor Specific(9)", "Copy Aborted", /* A: COPY or COMPARE was aborted */ "Aborted Command", /* B: The target aborted the command */ "Equal", /* C: A SEARCH DATA command found data equal */ "Volume Overflow", /* D: Medium full with still data to be written */ "Miscompare", /* E: Source data and data on the medium do not agree */ }; qc timeout ¶
ata3 ¶bus_for_each_dev bus: 'pci': driver_probe_device: matched device 0000:00:1f.2 with driver ata_piix ata_piix 0000:00:1f.2: PCI INT C -> GSI 20 (level, low) -> IRQ 20 ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ] ata_host_alloc: ENTER ata_port_alloc: ENTER ata_port_alloc: ENTER piix_init_pcs: updating PCS from 0x55 to 0x5f ata_piix 0000:00:1f.2: setting latency timer to 64 __ata_port_freeze: ata4294967295 port frozen __ata_port_freeze: ata4294967295 port frozen scsi2 : ata_piix scsi3 : ata_piix ata3: SATA max UDMA/133 cmd 0xfe00 ctl 0xfe10 bmdma 0xfea0 irq 20 ata4: SATA max UDMA/133 cmd 0xfe20 ctl 0xfe30 bmdma 0xfea8 irq 20 ata_host_register: probe begin ata_port_schedule_eh: port EH scheduled ata3: ata_port_flush_task: EXIT __ata_port_freeze: ata3 port frozen ata_sff_softreset: ENTER ata_sff_softreset: about to softreset, devmask=1 ata_bus_softreset: ata3: bus reset via SRST ata_dev_classify: found ATA device by sig ata_sff_softreset: EXIT, classes[0]=1 [1]=1 ata_eh_thaw_port: ata3 port thawed ata_std_postreset: ENTER ata_std_postreset: EXIT ata3.00: ata_dev_read_id: ENTER ata_pio_sector: data read ata3: ata_port_flush_task: EXIT ata3: ata_port_flush_task: EXIT ata3.00: ATA-6: ST3160023AS, 8.12, max UDMA/133 ata3.00: 312500000 sectors, multi 8: LBA48 NCQ (depth 0/32) ata_dev_set_xfermode: set features - xfer mode ata3: ata_port_flush_task: EXIT ata_dev_set_xfermode: EXIT, err_mask=0 ata3.00: ata_dev_read_id: ENTER ata_pio_sector: data read ata3: ata_port_flush_task: EXIT ata3: ata_port_flush_task: EXIT ata_dev_set_mode: xfer_shift=12, xfer_mode=0x46 ata3.00: configured for UDMA/133 ata_eh_recover: EXIT, rc=0 ata_scsi_error: EXIT ata_port_schedule_eh: port EH scheduled ata4: ata_port_flush_task: EXIT __ata_port_freeze: ata4 port frozen ata_sff_softreset: ENTER ata_sff_softreset: about to softreset, devmask=0 ata_bus_softreset: ata4: bus reset via SRST ata_sff_softreset: EXIT, classes[0]=9 [1]=1 ata_eh_thaw_port: ata4 port thawed ata_std_postreset: ENTER ata_std_postreset: EXIT ata_eh_recover: EXIT, rc=0 ata_scsi_error: EXIT ata_host_register: host probe begin scsi 2:0:0:0: Direct-Access ATA ST3160023AS 8.12 PQ: 0 ANSI: 5 bus: 'scsi': driver_probe_device: matched device 2:0:0:0 with driver sd sd 2:0:0:0: [sda] 312500000 512-byte hardware sectors (160000 MB) sd 2:0:0:0: [sda] Write Protect is off sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 2:0:0:0: [sda] 312500000 512-byte hardware sectors (160000 MB) sd 2:0:0:0: [sda] Write Protect is off sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sda3 < sda5 sda6 sda7 sda8 sda9 > sda4 sd 2:0:0:0: [sda] Attached SCSI disk sd 2:0:0:0: Attached scsi generic sg1 type 0 ata_host_register ¶ata_host_register: probe begin ..... ata_host_register: host probe begin * * int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) : libata-core.c
ata_host_register: host probe begin scsi 2:0:0:0: Direct-Access ATA ST3160023AS 8.12 PQ: 0 ANSI: 5* int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) : libata-core.c
sdev_printk(KERN_NOTICE, sdev, "%s %.8s %.16s %.4s PQ: %d " "ANSI: %d%s\n", scsi_device_type(sdev->type), sdev->vendor, sdev->model, sdev->rev, sdev->inq_periph_qual, inq_result[2] & 0x07, (inq_result[3] & 0x0f) == 1 ? " CCS" : ""); kernel init ¶
fedora core 9 ¶
int ata_bus_probe(struct ata_port *ap) unsigned int classes[ATA_MAX_DEVICES]; int tries[ATA_MAX_DEVICES]; void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp) for (i = 0; i < ATA_MAX_DEVICES; i++) { ata_dev_init(dev);
fedora core 10 ¶*¹«¼±·£ ¿¬°áÀÌ ÀÚµ¿À¸·Î µÊ
* grub ÀÌ º¯ÇÑ °Í °°À½.
* sata 2 ¸¦ disconnect ÇÏ°í install rescue »ç¿ëÇÏ¿© grub À缳ġ
hangup ¶
zaptel ¶
x100p ¶[root@localhost ~]# ztcfg Notice: Configuration file is /etc/zaptel.conf line 0: Unable to open master device '/dev/zap/ctl' 1 error(s) detected [root@localhost ~]# modprobe wcfxs Notice: Configuration file is /etc/zaptel.conf line 0: Unable to open master device '/dev/zap/ctl' 1 error(s) detected FATAL: Error running install command for wctdm [root@localhost ~]#
Â¥Áõ ¶* piix_init+0x0/0x4e()
# static inline int pci_register_driver(struct pci_driver *driver) * include/linux/pci.h * return __pci_register_driver(driver, THIS_MODULE); # int __pci_register_driver(struct pci_driver *drv, struct module *owner) * drivers/pci/pci-driver.c * error = driver_register(&drv->driver); # int driver_register(struct device_driver * drv) * drivers/base/driver.c * return bus_add_driver(drv); # int bus_add_driver(struct device_driver * drv) * drivers/base/bus.c
int driver_attach(struct device_driver *drv) { return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach); } * drivers/base/dd.c int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data, int (*fn)(struct device *, void *)) while ((dev = next_device(&i)) && !error) error = fn(dev, data); * drivers/base/bus.c * fn(dev, data)= __driver_attach
# static int __driver_attach(struct device * dev, void * data) * drivers/base/dd.c * driver_probe_device(drv, dev); printk(KERN_ERR "bus: '%s': %s: matched device %s with driver %s\n", drv->bus->name, __func__, dev->bus_id, drv->name);
# int driver_probe_device(struct device_driver * drv, struct device * dev) * drivers/base/dd.c * ret = drv->probe(dev); piix_init_one
piix_init_one ¶ata_piix 0000:00:1f.1: version 2.12
ata_piix 0000:00:1f.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
ata_piix 0000:00:1f.1: setting latency timer to 64
ata_host_register ¶
scsi0 : ata_piix scsi1 : ata_piix ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14 ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15
for (i = 0; i < host->n_ports; i++) { struct ata_port *ap = host->ports[i]; ata_scsi_scan_host(ap, 1); } scsi 0:0:0:0: CD-ROM HL-DT-ST DVDRAM GSA-4160B A306 PQ: 0 ANSI: 5 ... ... scsi 0:0:1:0: Direct-Access ATA SAMSUNG SP0802N UR10 PQ: 0 ANSI: 5 .... .... * void ata_scsi_scan_host(struct ata_port *ap, int sync): libata-scsi.c
scsi_add_lun ¶scsi 0:0:1:0: Direct-Access ATA SAMSUNG SP0802N UR10 PQ: 0 ANSI: 5
bus: 'scsi': driver_probe_device: matched device 0:0:1:0 with driver sd * ret = really_probe(dev, drv); base/dd.c
* static int sd_probe(struct device *dev)
if (sdkp->media_present) { sd_read_capacity(sdkp, buffer); sd_read_write_protect_flag(sdkp, buffer); sd_read_cache_type(sdkp, buffer); sd_read_app_tag_own(sdkp, buffer); } sd 0:0:1:0: [sda] 156368016 512-byte hardware sectors (80060 MB) sd 0:0:1:0: [sda] Write Protect is off sd 0:0:1:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:1:0: [sda] 156368016 512-byte hardware sectors (80060 MB) sd 0:0:1:0: [sda] Write Protect is off sd 0:0:1:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
res = scsi_mode_sense(sdp, 1, 0x0a, buffer, 36, SD_TIMEOUT, SD_MAX_RETRIES, &data, &sshdr); sda: sda1
sd 0:0:1:0: [sda] Attached SCSI disk sd 0:0:1:0: Attached scsi generic sg1 type 0 add_disk ¶* sd_probe: drivers/scsi/sd.c
ata_scsi_error ¶* libata-eh.c
libata-core.c const struct ata_port_operations ata_base_port_ops = { .prereset = ata_std_prereset, .postreset = ata_std_postreset, .error_handler = ata_std_error_handler, };
ata_eh_revalidate_and_attach ¶* libata-eh.c
ata_eh_revalidate_and_attach: ENTER ata3.01: ata_dev_read_id: ENTER ata_pio_sector: data read ata_port_flush_task: ENTER ata3: ata_port_flush_task: EXIT ata3.00: ata_dev_read_id: ENTER ata_pio_sector: data read ata_port_flush_task: ENTER ata3: ata_port_flush_task: EXIT ata_port_flush_task: ENTER ata3: ata_port_flush_task: EXIT ata3.00: ATA-6: ST3160023AS, 8.12, max UDMA/133 ata3.00: 312500000 sectors, multi 8: LBA48 NCQ (depth 0/32) ata_port_flush_task: ENTER ata3: ata_port_flush_task: EXIT __ata_port_freeze: ata3 port frozen ata3.01: qc timeout (cmd 0xf8) ata3.01: failed to read native max address (err_mask=0x4) ata3.01: HPA support seems broken, skipping HPA handling ata_eh_revalidate_and_attach: EXIT rc=-5
* ata_do_set_mode
DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n", dev->xfer_shift, (int)dev->xfer_mode); ata_dev_printk(dev, KERN_INFO, "configured for %s%s\n", ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)), dev_err_whine); error ¶Alex Gonzalez wrote: :<6> sda:0:msdos_partition: sector_size=1 0:read_dev_sector: mapping = 87946cac 0:__read_cache_page:cached_page=83a15580 0:read_cache_page: page=83a15580 0:lock_page 0:sync_page on mm/filemap.c 0:block_sync_page 0:blk_run_backing_dev() 0:blk_backing_dev_unplug() 0:scsi_request_fn 0:scsi_dispatch_cmd 0:ata_scsi_queuecmd 0:ata_scsi_translate 0:***ata_qc_prep*** 0:***ata_check_status*** 0:***ata_std_dev_select*** 0:***ata_check_status*** 0:***ata_check_status*** 0:***ata_tf_load 0:***ata_bmdma_setup*** 0:***ata_exec_command*** 0:***ata_bmdma_start*** 0:Dispatched cmd 8b64eba0 with rth 0 <PAUSE> 0:***sil_freeze()*** 0:***ata_bmdma_error_handler*** This is libata error handling kicking in after detecting command timeout. 0:***ata_bmdma_status*** 0:***ata_bmdma_stop*** And EH tries to stop the bmdma engine. ********************************************* cpu_0 received a bus/cache error ********************************************* Bridge: Phys Addr = 0x0000000000, Device_AERR = 0x00000000 Bridge: The devices reporting AERR are: CPU: (XLR specific) Cache Error log = 0x0000007800004601, Phy Addr = 0x00f0000088 CPU: epc = 0x83435dfc, errorepc = 0x835bf054, cacheerr = 0x00000000 Can not handle bus/cache error - Halting cpu Which triggers bus/cache error. Hmmm... When the booting works, does the drive keep working after boot? ie. if you put the drive under stress test, does the system survive. Also, error handling shouldn't trigger bus/cache error. Do you know what the bus/cache error means? scsi_mode_sense ¶* scsi/scsi_lib.c
ata_scsi_scan_host ¶* ata_sff_interrupt
DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read"); * atapi_eh_request_sense
DPRINTK("ATAPI request sense\n");
DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command); * ata_sff_hsm_move
DPRINTK("ata%u: protocol %d task_state %d (dev_stat 0x%X)\n", ap->print_id, qc->tf.protocol, ap->hsm_task_state, status);
DPRINTK("send cdb\n"); |