On Wed, May 29, 2013 at 12:12 AM, Philip J. Kelleher
<[email protected]> wrote:
> From: Philip J Kelleher <[email protected]>
>
> Adding a module parameter called 'sync_start' to wait for
> the card to fully up and running before driver load is
> complete.


> +++ linux-block/drivers/block/rsxx/core.c       2013-05-02 17:32:20.341185588 
> -0500
> @@ -41,6 +41,8 @@
>  #include "rsxx_cfg.h"
>
>  #define NO_LEGACY 0
> +#define NO_SYNC_START 0
> +#define SYNC_START_TIMEOUT (10 * 60) /* 10 minutes */

10 minutes is indefinite time. May be you have to load timer and
create device only after successfull initialization of the device?

> @@ -874,6 +882,33 @@ static int rsxx_pci_probe(struct pci_dev
>                 if (st)
>                         dev_crit(CARD_TO_DEV(card),
>                                 "Failed issuing card startup\n");
> +               if (sync_start) {
> +                       sync_timeout = SYNC_START_TIMEOUT;
> +
> +                       dev_info(CARD_TO_DEV(card),
> +                                "Waiting for card to startup\n");
> +
> +                       do {
> +                               ssleep(1);

Why not timers?

--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to