@@ -184,62 +184,6 @@ void ata_sff_dma_pause(struct ata_port *ap)
184
184
}
185
185
EXPORT_SYMBOL_GPL (ata_sff_dma_pause );
186
186
187
- /**
188
- * ata_sff_busy_sleep - sleep until BSY clears, or timeout
189
- * @ap: port containing status register to be polled
190
- * @tmout_pat: impatience timeout in msecs
191
- * @tmout: overall timeout in msecs
192
- *
193
- * Sleep until ATA Status register bit BSY clears,
194
- * or a timeout occurs.
195
- *
196
- * LOCKING:
197
- * Kernel thread context (may sleep).
198
- *
199
- * RETURNS:
200
- * 0 on success, -errno otherwise.
201
- */
202
- int ata_sff_busy_sleep (struct ata_port * ap ,
203
- unsigned long tmout_pat , unsigned long tmout )
204
- {
205
- unsigned long timer_start , timeout ;
206
- u8 status ;
207
-
208
- status = ata_sff_busy_wait (ap , ATA_BUSY , 300 );
209
- timer_start = jiffies ;
210
- timeout = ata_deadline (timer_start , tmout_pat );
211
- while (status != 0xff && (status & ATA_BUSY ) &&
212
- time_before (jiffies , timeout )) {
213
- ata_msleep (ap , 50 );
214
- status = ata_sff_busy_wait (ap , ATA_BUSY , 3 );
215
- }
216
-
217
- if (status != 0xff && (status & ATA_BUSY ))
218
- ata_port_warn (ap ,
219
- "port is slow to respond, please be patient (Status 0x%x)\n" ,
220
- status );
221
-
222
- timeout = ata_deadline (timer_start , tmout );
223
- while (status != 0xff && (status & ATA_BUSY ) &&
224
- time_before (jiffies , timeout )) {
225
- ata_msleep (ap , 50 );
226
- status = ap -> ops -> sff_check_status (ap );
227
- }
228
-
229
- if (status == 0xff )
230
- return - ENODEV ;
231
-
232
- if (status & ATA_BUSY ) {
233
- ata_port_err (ap ,
234
- "port failed to respond (%lu secs, Status 0x%x)\n" ,
235
- DIV_ROUND_UP (tmout , 1000 ), status );
236
- return - EBUSY ;
237
- }
238
-
239
- return 0 ;
240
- }
241
- EXPORT_SYMBOL_GPL (ata_sff_busy_sleep );
242
-
243
187
static int ata_sff_check_ready (struct ata_link * link )
244
188
{
245
189
u8 status = link -> ap -> ops -> sff_check_status (link -> ap );
0 commit comments