ahci: Fix data abort on multiple scsi resets

	introduced a regression that causes a data
	abort when running scsi init followed by scsi reset.

	There are 2 problems with the original commit
	1) ALLOC_CACHE_ALIGN_BUFFER() allocates memory on the stack but is
	   assigned to ataid[port] and used by other functions.
	2) The function ata_scsiop_inquiry() tries to free memory which was
	   never allocated on the heap.

Fix these problems by using tmpid as a temporary cache aligned buffer.
Allocate memory separately for ataid[port] and re-use it if required.

Fixes: 2faf5fb82ed6 (ahci: Fix cache align error messages)

Reported-by: Eli Nidam <elini@marvell.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>

Change-Id: Iaf3edd794943c8ff7da7d3ae0f9f42e34de89221
Signed-off-by: Eli Nidam <elini@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/6843
Tested-by: Star_Automation <star@marvell.com>
Reviewed-by: Omri Itach <omrii@marvell.com>
Tested-by: Omri Itach <omrii@marvell.com>
1 file changed