Steve Chang wrote:
> Here still has some questions
> 1. As you said, run "rem_drv sd" and then run "rem_drv mydriver"
>    I did get "detach()" call. Every thing looks OK to release all
>    resources but later after "Fini()" is called and done, system hang.
>    Through traces, the kernel still dispatch interrupt to driver but 
>    at this moment, all driver's resources have been removed already. 
>    Does it mean my driver still missing handling something?  
We usually disable the interrupt and then waiting for all the commands
coming back, then release the resource.
>
> 2. Another thing is after removing the driver not successful, reboot 
>    the system and reload the driver "add_drv ..". Now driver can be 
>    loaded but disks can’t be detected. The kernel only send cmd "0x12"
>    to detect hard disk and no more other commands. What happens to 
>    kernel? Is there any easy to let kernel back on normal besides
>    reinstall the original kernel file?
You can try rem_drv firstly and then add_drv to make sure all related info
was correct on your system.
If you can get the 0x12(inquiry) command, that means scsi_hba_probe was
called, and it will send inquiry command to probe the disk, if command
return successfully, then after tgt_init succeed, sd will be attached.
You can try to figure out your problem following it.

Thanks,
Ada
>
> Thanks
> Steve  
>
>  
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 05, 2008 5:23 AM
> To: Steve Chang
> Cc: [EMAIL PROTECTED]; driver-discuss@opensolaris.org
> Subject: Re: [driver-discuss] SCSI HBA device driver unload question?
>
> If you want to unload your hba driver, you should make
> sure your hba device has no child in the device tree via
> "prtconf -D"
>
> And if there are some sd instance under your hba, you
> can try "rem_drv sd" to unload the sd driver firstly, and
> then unload your hba driver.  But before you unload sd
> driver, please make sure your boot system is not a SCSI
> disk, that means it is not drived by sd driver.
>
> Thanks,
> Ada
>
> Steve Chang wrote:
>> Hello,
>> Here is another question about driver unload.
>> I've tried to unload the driver by "rem_drv mydriver"
>> but it always reports "Device Busy" and if do it one more
>> time, it said driver is removed but you need to reboot
>> the system to take effect. From debugging trace, I didn't
>> see "detach" routine is called?
>>
>> At this moment, there is no I/O activity but HBA firmware
>> naturally will keep interrupting HBA for service even it is
>> a null interrupt. In this case, how to handle that so my driver
>> can stop the interrupt first, then remove system resources
>> when users want to remove the driver.
>>
>>
>> Thanks
>> Steve
>>   
>>
>> _______________________________________________
>> driver-discuss mailing list
>> driver-discuss@opensolaris.org
>> http://mail.opensolaris.org/mailman/listinfo/driver-discuss
>>   
>
_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to