| .. | .. |
|---|
| 564 | 564 | struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); |
|---|
| 565 | 565 | unsigned short scsirate; |
|---|
| 566 | 566 | struct ahc_devinfo devinfo; |
|---|
| 567 | | - struct ahc_initiator_tinfo *tinfo; |
|---|
| 568 | | - struct ahc_tmode_tstate *tstate; |
|---|
| 569 | 567 | char channel = starget->channel + 'A'; |
|---|
| 570 | 568 | unsigned int our_id = ahc->our_id; |
|---|
| 571 | 569 | unsigned int target_offset; |
|---|
| .. | .. |
|---|
| 612 | 610 | spi_max_offset(starget) = 0; |
|---|
| 613 | 611 | spi_min_period(starget) = |
|---|
| 614 | 612 | ahc_find_period(ahc, scsirate, maxsync); |
|---|
| 615 | | - |
|---|
| 616 | | - tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id, |
|---|
| 617 | | - starget->id, &tstate); |
|---|
| 618 | 613 | } |
|---|
| 619 | 614 | ahc_compile_devinfo(&devinfo, our_id, starget->id, |
|---|
| 620 | 615 | CAM_LUN_WILDCARD, channel, |
|---|
| .. | .. |
|---|
| 671 | 666 | static int |
|---|
| 672 | 667 | ahc_linux_slave_configure(struct scsi_device *sdev) |
|---|
| 673 | 668 | { |
|---|
| 674 | | - struct ahc_softc *ahc; |
|---|
| 675 | | - |
|---|
| 676 | | - ahc = *((struct ahc_softc **)sdev->host->hostdata); |
|---|
| 677 | | - |
|---|
| 678 | 669 | if (bootverbose) |
|---|
| 679 | 670 | sdev_printk(KERN_INFO, sdev, "Slave Configure\n"); |
|---|
| 680 | 671 | |
|---|
| .. | .. |
|---|
| 695 | 686 | ahc_linux_biosparam(struct scsi_device *sdev, struct block_device *bdev, |
|---|
| 696 | 687 | sector_t capacity, int geom[]) |
|---|
| 697 | 688 | { |
|---|
| 698 | | - uint8_t *bh; |
|---|
| 699 | 689 | int heads; |
|---|
| 700 | 690 | int sectors; |
|---|
| 701 | 691 | int cylinders; |
|---|
| 702 | | - int ret; |
|---|
| 703 | 692 | int extended; |
|---|
| 704 | 693 | struct ahc_softc *ahc; |
|---|
| 705 | 694 | u_int channel; |
|---|
| .. | .. |
|---|
| 707 | 696 | ahc = *((struct ahc_softc **)sdev->host->hostdata); |
|---|
| 708 | 697 | channel = sdev_channel(sdev); |
|---|
| 709 | 698 | |
|---|
| 710 | | - bh = scsi_bios_ptable(bdev); |
|---|
| 711 | | - if (bh) { |
|---|
| 712 | | - ret = scsi_partsize(bh, capacity, |
|---|
| 713 | | - &geom[2], &geom[0], &geom[1]); |
|---|
| 714 | | - kfree(bh); |
|---|
| 715 | | - if (ret != -1) |
|---|
| 716 | | - return (ret); |
|---|
| 717 | | - } |
|---|
| 699 | + if (scsi_partsize(bdev, capacity, geom)) |
|---|
| 700 | + return 0; |
|---|
| 701 | + |
|---|
| 718 | 702 | heads = 64; |
|---|
| 719 | 703 | sectors = 32; |
|---|
| 720 | 704 | cylinders = aic_sector_div(capacity, heads, sectors); |
|---|
| .. | .. |
|---|
| 746 | 730 | int error; |
|---|
| 747 | 731 | |
|---|
| 748 | 732 | error = ahc_linux_queue_recovery_cmd(cmd, SCB_ABORT); |
|---|
| 749 | | - if (error != 0) |
|---|
| 733 | + if (error != SUCCESS) |
|---|
| 750 | 734 | printk("aic7xxx_abort returns 0x%x\n", error); |
|---|
| 751 | 735 | return (error); |
|---|
| 752 | 736 | } |
|---|
| .. | .. |
|---|
| 760 | 744 | int error; |
|---|
| 761 | 745 | |
|---|
| 762 | 746 | error = ahc_linux_queue_recovery_cmd(cmd, SCB_DEVICE_RESET); |
|---|
| 763 | | - if (error != 0) |
|---|
| 747 | + if (error != SUCCESS) |
|---|
| 764 | 748 | printk("aic7xxx_dev_reset returns 0x%x\n", error); |
|---|
| 765 | 749 | return (error); |
|---|
| 766 | 750 | } |
|---|
| .. | .. |
|---|
| 807 | 791 | .this_id = -1, |
|---|
| 808 | 792 | .max_sectors = 8192, |
|---|
| 809 | 793 | .cmd_per_lun = 2, |
|---|
| 810 | | - .use_clustering = ENABLE_CLUSTERING, |
|---|
| 811 | 794 | .slave_alloc = ahc_linux_slave_alloc, |
|---|
| 812 | 795 | .slave_configure = ahc_linux_slave_configure, |
|---|
| 813 | 796 | .target_alloc = ahc_linux_target_alloc, |
|---|
| .. | .. |
|---|
| 1609 | 1592 | case AC_TRANSFER_NEG: |
|---|
| 1610 | 1593 | { |
|---|
| 1611 | 1594 | struct scsi_target *starget; |
|---|
| 1612 | | - struct ahc_linux_target *targ; |
|---|
| 1613 | 1595 | struct ahc_initiator_tinfo *tinfo; |
|---|
| 1614 | 1596 | struct ahc_tmode_tstate *tstate; |
|---|
| 1615 | 1597 | int target_offset; |
|---|
| .. | .. |
|---|
| 1643 | 1625 | starget = ahc->platform_data->starget[target_offset]; |
|---|
| 1644 | 1626 | if (starget == NULL) |
|---|
| 1645 | 1627 | break; |
|---|
| 1646 | | - targ = scsi_transport_target_data(starget); |
|---|
| 1647 | 1628 | |
|---|
| 1648 | 1629 | target_ppr_options = |
|---|
| 1649 | 1630 | (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) |
|---|
| .. | .. |
|---|
| 1730 | 1711 | */ |
|---|
| 1731 | 1712 | cmd->sense_buffer[0] = 0; |
|---|
| 1732 | 1713 | if (ahc_get_transaction_status(scb) == CAM_REQ_INPROG) { |
|---|
| 1714 | +#ifdef AHC_REPORT_UNDERFLOWS |
|---|
| 1733 | 1715 | uint32_t amount_xferred; |
|---|
| 1734 | 1716 | |
|---|
| 1735 | 1717 | amount_xferred = |
|---|
| 1736 | 1718 | ahc_get_transfer_length(scb) - ahc_get_residual(scb); |
|---|
| 1719 | +#endif |
|---|
| 1737 | 1720 | if ((scb->flags & SCB_TRANSMISSION_ERROR) != 0) { |
|---|
| 1738 | 1721 | #ifdef AHC_DEBUG |
|---|
| 1739 | 1722 | if ((ahc_debug & AHC_SHOW_MISC) != 0) { |
|---|