/* Called as a tasklet when an event arrives from the L1. Read the event from where it's temporarily stored in SAL and call scdrv_dispatch_event() to send it on its way. Keep trying to read events until SAL indicates that there are no more immediately available.  */
void scdrv_event(unsigned long)
/* Called as a tasklet when an event arrives from the L1. Read the event from where it's temporarily stored in SAL and call scdrv_dispatch_event() to send it on its way. Keep trying to read events until SAL indicates that there are no more immediately available.  */
void scdrv_event(unsigned long)
{
	int status;
	int len;
	unsigned long flags;
	struct subch_data_s *sd = event_sd;
	len = CHUNKSIZE;
	spin_lock_irqsave(&sd->sd_rlock, flags);
	status = ia64_sn_irtr_recv(sd->sd_nasid, sd->sd_subch,
				   sd->sd_rb, &len);
	while (!(status < 0)) {
		spin_unlock_irqrestore(&sd->sd_rlock, flags);
		scdrv_dispatch_event(sd->sd_rb, len);
		len = CHUNKSIZE;
		spin_lock_irqsave(&sd->sd_rlock, flags);
		status = ia64_sn_irtr_recv(sd->sd_nasid, sd->sd_subch,
					   sd->sd_rb, &len);
	}
	spin_unlock_irqrestore(&sd->sd_rlock, flags);
}