.. | .. |
---|
714 | 714 | .eh_host_reset_handler = atari_scsi_host_reset, |
---|
715 | 715 | .this_id = 7, |
---|
716 | 716 | .cmd_per_lun = 2, |
---|
717 | | - .use_clustering = DISABLE_CLUSTERING, |
---|
| 717 | + .dma_boundary = PAGE_SIZE - 1, |
---|
718 | 718 | .cmd_size = NCR5380_CMD_SIZE, |
---|
719 | 719 | }; |
---|
720 | 720 | |
---|
.. | .. |
---|
757 | 757 | |
---|
758 | 758 | if (setup_hostid >= 0) { |
---|
759 | 759 | atari_scsi_template.this_id = setup_hostid & 7; |
---|
760 | | - } else { |
---|
| 760 | + } else if (IS_REACHABLE(CONFIG_NVRAM)) { |
---|
761 | 761 | /* Test if a host id is set in the NVRam */ |
---|
762 | | - if (ATARIHW_PRESENT(TT_CLK) && nvram_check_checksum()) { |
---|
763 | | - unsigned char b = nvram_read_byte(16); |
---|
| 762 | + if (ATARIHW_PRESENT(TT_CLK)) { |
---|
| 763 | + unsigned char b; |
---|
| 764 | + loff_t offset = 16; |
---|
| 765 | + ssize_t count = nvram_read(&b, 1, &offset); |
---|
764 | 766 | |
---|
765 | 767 | /* Arbitration enabled? (for TOS) |
---|
766 | 768 | * If yes, use configured host ID |
---|
767 | 769 | */ |
---|
768 | | - if (b & 0x80) |
---|
| 770 | + if ((count == 1) && (b & 0x80)) |
---|
769 | 771 | atari_scsi_template.this_id = b & 7; |
---|
770 | 772 | } |
---|
771 | 773 | } |
---|