From: SAWADA K. <car...@us...> - 2005-02-05 15:28:56
|
> > (Developers, Even an AUTO_OFFLINE feature, kernel treats sector count > > register as real data length... Let me think about it to avoid it...) > > I think I had (have) a similar problem with the Linux interface. History repeats itself... Solaris ATA interface disables Automatic Save Attributes incorrectly too. > Solution: I allocate a big buffer so that the kernel can write garbage > there without SEGV (os_linux.c): > > // huge value of buffer size needed because HDIO_DRIVE_CMD assumes > // that buff[3] is the data size. Since the ATA_SMART_AUTOSAVE and > // ATA_SMART_AUTO_OFFLINE use values of 0xf1 and 0xf8 we need the space. > // Otherwise a 4+512 byte buffer would be enough. > #define STRANGE_BUFFER_LENGTH (4+512*0xf8) > unsigned char buff[STRANGE_BUFFER_LENGTH]; > > Can you do this with Solaris too? This method brings another problem; kernel starts to transfer 0xf1 or 0xf8 sectors length, and waits for completion that never happens. But fortunately, we can specify sector count and transfer count independantly so we can starts no-data command (AUTOSAVE and AUTO_OFFLINE) correctly. Roy, I fixed code in CVS repository. Could you try anonymous CVS or wait for upcoming release 5.34? Thanks again for reporting. Regards, ksw / SAWADA Keiji <car...@us...> |