hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/scsi/atari_scsi.c
....@@ -714,7 +714,7 @@
714714 .eh_host_reset_handler = atari_scsi_host_reset,
715715 .this_id = 7,
716716 .cmd_per_lun = 2,
717
- .use_clustering = DISABLE_CLUSTERING,
717
+ .dma_boundary = PAGE_SIZE - 1,
718718 .cmd_size = NCR5380_CMD_SIZE,
719719 };
720720
....@@ -757,15 +757,17 @@
757757
758758 if (setup_hostid >= 0) {
759759 atari_scsi_template.this_id = setup_hostid & 7;
760
- } else {
760
+ } else if (IS_REACHABLE(CONFIG_NVRAM)) {
761761 /* 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);
764766
765767 /* Arbitration enabled? (for TOS)
766768 * If yes, use configured host ID
767769 */
768
- if (b & 0x80)
770
+ if ((count == 1) && (b & 0x80))
769771 atari_scsi_template.this_id = b & 7;
770772 }
771773 }